<< Click to Display Table of Contents >> Assembling VPE Document Files |
If you call WriteDoc() with the file name of an existing file, VPE will append the current document to the end of the existing one. This allows to assemble multiple documents together. For the assembly process, there is no additional memory required.
If you do not want to append a document to an existing VPE document file, you must delete the existing document file first, before calling WriteDoc().
In addition the Professional Edition and higher allow to read and write specific page ranges to / from a VPE document file.
Care must be taken, when merging documents: if you use @PAGE in headers or footers, the numbers will not be correct, since they are already computed and stored in the document files. The best solution is, not to use the @PAGE function in such case, but to store the documents without any page-number information. Then, after you have merged all required documents together, you can use the standard page numbering algorithm to number the pages.
You can also call WriteDoc() for disk-based documents, so you can append a disk based document to another existing VPE document file. This guarantees minimum memory usage, since disk-based documents require only memory for a single page.