-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transferred Annotations not Rendering Correctly #2960
Comments
Not related to your issue, but Apart from this: The issue should be much easier to analyze if you could provide a small example showing the same problem without all the overhead of the unrelated page content. I would appreciate a simple reproducer with the following properties:
This way, we should be able to better spot which values might changed in-between without too much overhead. Are you able to provide such an example? |
@stefan6419846 , yes I will be able to provide a much simpler example at a later time, hopefully within the next 24 hours at the most. I'll also include multiple annotation types. |
@stefan6419846 , attached are four files: File to read Annotations from (reader): File to write Annotations to (writer): PyPDF Output (writer.write): Expected Output (3rd party PDF software annotations transfer): If I need to make it any simpler, please let me know. I added about every annotation type I had at my disposal. And thank you again! |
We often get new/revised PDF's for plan documents. Part of the transfer process is transferring any Annotations from the previous version to the new version. We've been doing this using our PDF software, but I wanted to try an hammer it out programmatically with pypdf.
However, I'm not sure if our PDF software is under-defining the Annotation data or what, but it's inconsistent with what existed vs. what's rendered in the new PDF.
If this is user error, I apologize. I'm intermediate at best in Python, so if there's a way I can filter the Annotation data to get on the correct format, I'm all ears (and very grateful)
*There are some foobar annotations that I was using for testing.
Environment
Code + PDF
Below is a test code I was working on that pulls in the New/Old PDF, extracts the Annotation objects from the Old PDF, and attempts to write them to the New PDF
Below are the PDF files - OldPath, NewPath, and SavePath
OldPath.pdf
NewPath.pdf
SavePath.pdf
Traceback
No Traceback as the code runs without error, but the end result is unexpected.
The text was updated successfully, but these errors were encountered: