Replies: 5 comments
-
Could you please provide an example file which demonstrates your current situation? |
Beta Was this translation helpful? Give feedback.
-
Of course. I did manage to get links, but I'm very new to PDF syntax so I don't know if I'm on the right path reader = PdfReader("../example.pdf")
for page in reader.pages:
for annotation in page.annotations:
obj = annotation.get_object()
if obj.get('/Subtype') == '/Link':
print('Link : ', obj.get('/A').get('/URI')) |
Beta Was this translation helpful? Give feedback.
-
your approach is correct. Just be carefull that some times destinations are stored in named destination list. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answers/help. Do you have an example please ? |
Beta Was this translation helpful? Give feedback.
-
I transfer this thread to discussions |
Beta Was this translation helpful? Give feedback.
-
Explanation
We need to extract all links in our pdf documents.
To be more precise on our usage : people generate PDF with images (architects Moodboards) and on each image they add a link to the source image, so readers can have more information about the product on the image.
Code Example
How would your feature be used? (Remove this if it is not applicable.)
Beta Was this translation helpful? Give feedback.
All reactions