Fast VDP mode

In order to understand when this feature can be successfully used we need to understand the nature of VDP files. How exactly are they different from other PDF files?

VDP files often have several thousand pages, but the pages are not fully independent from each other. There typically are repeating  page sequences. Each such sequence forms a "record". A record could for instance contain front and back page of a postcard. Another example is a flyer with 8 pages, the record size would then be 8. Usually lots of content is "static", that means it is present on all corresponding pages in the records. In addition there is also some content that is present only in the specific record. That could eg. be the address on the postcard.

In the internal PDF structure, a PDF usually uses form XObjects for the static content. The corresponding pages in different records all reference the same static form XObjects. This technique does not only reduce the file size of the VDP file, it is also important for processing the PDF.

Unfortunately there is one complication: A form XObject may depend on the context in which it is invoked. An extreme example would be a form XObject that draws a rectangle using a color that is not defined in the form XObject itself, but in the parent content from which it is invoked. That means the color of the rectangle when rendered would be different, depending on the parent context. You will probably never see such an extreme case in a real world PDF file, however that a form XObject is fully self contained is definitely not a given in a PDF file.

Since form XObject may depend on the context from which they are invoked, pdfToolbox is not able to reuse any processing results (during analysis or correction). Instead it has to process the same form XObject again and again whenever it is invoked. This is for most PDFs not a big issue, since not many form XObjects are reused. 

That is, however, different in VDP files. As we have seen an important characteristic of VDP files is, that lots of the content is contained in reused form XObjects. These form XObjects are almost always invoked from the same context and therefore independent - otherwise the records would not look the same.

For VDP files it is not only safe to reuse the results for the static form XObjects - that in addition has a huge performance impact. For this reason pdfToolbox 14 introduces "Fast VDP mode". In this mode static form XObjects are identified and results (from correction or analysis) are saved (cached) and used again when the same form XObject is invoked. As a result processing a VDP file may only use a fraction of the time that would be needed in normal mode. For regular PDF files on the other hand you will usually not notice a big performance difference. In rare cases, however, you will see incorrect results. So it is important to only use this mode for VDP files or step and repeat results where the same content is used again and again.

"Fast VDP mode" can be enabled in a Process Plan for Checks, Fixups and Profiles.

Desktop

Fast VDP mode can also be enabled on command line (via --fastvdpmode) or in the SDK. It is also available in Test mode.