-
Notifications
You must be signed in to change notification settings - Fork 561
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
page.links return all links with same xref, is it something possible ?? #3563
Comments
Please provide a reproducing example. |
Hard to do since it's a resume of an existing person and personal data... You have a way to workaround this to provide the example ? |
Your PDF obviously has a problem which we should intercept and handle in a better way. So, no: we need a reproducer to confirm that we guessed the right cause. But you can use my private email for the submission so it won't be exposed to the public.
Otherwise this post will never become a bug report ...
Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
…________________________________
From: Flint ***@***.***>
Sent: Monday, June 10, 2024 3:03:12 AM
To: pymupdf/PyMuPDF ***@***.***>
Cc: Jorj X. McKie ***@***.***>; Comment ***@***.***>
Subject: Re: [pymupdf/PyMuPDF] page.links return all links with same xref, is it something possible ?? (Issue #3563)
Please provide a reproducing example. So far your post leads to nothing actionable.
Hard to do since it's a resume of an existing person and personal data... You have a way to workaround this to provide the example ?
—
Reply to this email directly, view it on GitHub<#3563 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB7IDIUIV7R7E3PED7QX3V3ZGVFTBAVCNFSM6AAAAABJBAXOWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJXGQ4TIMRVG4>.
You are receiving this because you commented.Message ID: ***@***.***>
|
The example PDF shared with me violates the specifications for links / annotations: Instead of giving indirect references as it should be, it provides all the links dirctly in the
So pymupdf does recognize the links, but cannot assign an xref to them (xref=0 consequently). doc.xref_set_key(5, "Annots", "null")
print(doc.xref_object(5)) # 5 = page xref
<<
/Type /Page
/Parent 1 0 R
/MediaBox [ 0 0 540 780 ]
/Contents 134 0 R
/Resources <<
/ExtGState <<
/Alpha0 10 0 R
/Alpha1 11 0 R
>>
/Font <<
/Font4 14 0 R
/Font11 21 0 R
/Font12 22 0 R
/Font5 15 0 R
>>
>>
/Annots null
/Group <<
/S /Transparency
/CS /DeviceRGB
>>
>> All links are gone! |
BTW the example page looks exactly the same, but all hot areas are gone. |
Thanks Jorj !! |
I'm very suprised to analyze a pdf and try to get all the links and it give me a dict with links but all the same "xref".
Is there a way to delete these link although they all have the same xref ?
Thanks
The text was updated successfully, but these errors were encountered: