QuadPoints for re-use in the Adobe Embed API #2309
Unanswered
erswelljustin
asked this question in
Looking for help
Replies: 2 comments
-
Sorry, but I do not see where in your code you actually add the new annotation onthe new page. old=fitz.open("Sandborn2003Annotated.pdf")
oldpage=old[0]
oldannot=oldpage.first_annot
oldannot
'Highlight' annotation on page 0 of Sandborn2003Annotated.pdf
quads = []
for i in range(0, len(oldannot.vertices), 4):
quads.append(fitz.Quad(oldannot.vertices[i:i+4]))
new = fitz.open("Sandborn2003.pdf")
page=new[0]
page.add_highlight_annot(quads)
'Highlight' annotation on page 0 of Sandborn2003.pdf
new.save("x.pdf") |
Beta Was this translation helpful? Give feedback.
0 replies
-
For possible further inquiries, I am going to transfer this to the "Discussions" tab. |
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.
-
Please provide all mandatory information!
Describe the bug (mandatory)
We are trying to extract annotations from a PDF and then use that data to 'Cherry Pick' the annotations we require to display them in a clean version of the PDF using the Adobe Embed API. We are getting data fine from the PDF using PyMuPDF however when we apply the annotation to the clean PDF we are getting weird results.
To Reproduce (mandatory)
First parse the Annotated PDF (
Sandborn2003Annotated.pdf
)
Then using the Adobe Document Cloud Embed API - https://developer.adobe.com/document-services/docs/overview/pdf-embed-api/ apply the first Annotation in the stored json to a clean version of the file (
Sandborn2003.pdf
)
Expected behavior (optional)
We expect to see the clean PDF take on the same annotation as the source
Screenshots (optional)
Source Annotated Document (

)
Target PDF after applying the annotation (
)
Your configuration (mandatory)
Additional context (optional)
This my code
Beta Was this translation helpful? Give feedback.
All reactions