METHOD AND SYSTEM FOR MERGING PDF FILES IN A LARGE BATCH
摘要:
Disclosed are a method and system for merging a large batch of PDF files. The method comprises: outputting header information of a target PDF file, outputting catalog dictionary information, and generating an object number of a PDF page object and recording same; parsing in sequence PDF files to be merged, and acquiring the object number and the offset of all indirect objects and the catalog dictionary information; parsing in sequence, from within the catalog dictionary information, page object dictionary information corresponding to the PDF files to be merged, and reading in sequence object number information of each page object; invoking a global object number generator to generate a new object number, and recording the correspondence between original object number information and the new object number in a map; invoking an output class of a PDF indirect object, outputting a page object of the PDF files to be merged into a page object of the target PDF file, and recording same in the start position and length in the target PDF file; and checking whether all PDF files to be merged have completed merging.
信息查询
0/0