PDFlib+PDI: Importing PDFs with markup that was not flattened

81 Views Asked by At

We have thousands of PDFs we have made markup on. That markup is visible when you pull the PDF up in a PDF Viewer, or even a browser PDF viewer.

However, I'm attempting to merge some of these using PDFLib+PDI. I have the merging process down, but importing these pages with open_pdi_document/open_pdi_page does not bring over the added text.

I can't find anything in the manuals or tutorials on this. I'm hoping someone out there has experienced this and can point me in a direction that doesn't involve flattening a few thousand PDFs.

1

There are 1 best solutions below

0
stm On

The answer depends on the version of PDFlib that you are using. If you are using PDFlib+PDI 9 or older, it is true that it cannot import annotations and form fields. This is clearly documented in the PDFlib Tutorial. Quote from the PDFlib 9.4 Tutorial, "8.3.2 Using PDFlib+PDI":

"It is important to understand that PDI only imports the actual page contents, but not any interactive features (such as sound, movies, embedded files, hypertext links, form fields, JavaScript, bookmarks, thumbnails, and notes) which may be present in the imported PDF document."

PDFlib+PDI 10 it is capable of importing form fields and annotations. See the PDFlib 10 Tutorial, "8.3.4 Importing Annotations, Form Fields and Actions".