Replies: 1 comment
-
|
@li-xilin So yes that is basically it. You'll also want to copy any (regular) metadata from the old file's catalog to the new one. There probably will be some reorganization/object renumbering when you copy the pages, and if there are any "dead" (unreferenced) objects in the original PDF, those will be omitted from the new PDF unless you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
pdfio doesn't support in-place editing. The suggested approach for modifying files involves iterating through each page of the PDF and copying them to a new PDF file. I'd like to understand in depth:
Whether this process might cause any data loss in the original file
Are elements copied exactly as-is, or will pdfio reorganize document elements to the best of its current capability?
My use case is very simple - I only need to:
Edit the document's XMP metadata
Add some custom entries
Is the following workflow sufficient?
Iterate through each page of the original PDF and copy to a new PDF file
Appropriately edit/modify the original metadata and write it to the new PDF
Are there any additional steps required?
Beta Was this translation helpful? Give feedback.
All reactions