The invention relates to the technical field of document typesetting, in particular to a document streaming
layout rendering method and device based on configuration driving. The method comprises the following steps: defining a four-dimensional generation key value pair configuration file according to document attributes, page
layout, component geometry and styles, and verifying the key value pair configuration file; converting the configuration node into a
document object model through an analysis engine; receiving external
business data, positioning a dynamic slot position in the model, filling data, and generating a to-be-rendered instance tree; constructing a component rendering factory based on the strategy mode, and dynamically instantiating a corresponding rendering strategy class; and calculating the geometric position of the component by adopting a streaming typesetting
algorithm,
paging according to requirements, generating and executing a drawing instruction, and outputting a PDF (
Portable Document Format) document. Aiming at the problems of code and style
coupling, out-of-control typesetting and high operation threshold in the existing scheme,
layout and code decoupling, high-precision typesetting and low-threshold configuration are realized, the method is adaptive to the requirements of multiple scenes such as finance and
medical treatment, and the expansibility is high.