-
Notifications
You must be signed in to change notification settings - Fork 491
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
Question / Comment: Slight link inconsistency #447
Comments
Thanks for submitting this. I'll will have a luck into it. |
Weird - cannot reproduce this. I have a test script for insertPDF which does the same as your alternative 1 - attaching it with test files. If you would please try it out: insertPDF.zip And / or you could send me your script and accompanying files if confidentiality situation permits. |
Hey, thanks for looking into this. I wouldn't want to upload the PDF to github because of confidentiality, I will upload my script in the next post. I've also tried the script and the provided PDF files and I get the same type of rectangle around links as you can see here: Terminal output from your script: |
I've uploaded the script as you asked. Some explanation as to what it does: There are 2 modules: fitz_pdf.py (everything concerning fitz) and pdfmerger.py (GUI stuff). And is started (at the moment) by running test_wxpanel.py fitz_pdf contains a class providing 'easy access' to the fitz functionality.
Something like this will be called from the GUI code. PS: I don't know if it's relevant, but the versions of python and pymupdf I'm running:
|
Ha! Found it!
This is an easy change. Please let me know your urgency - you seem to have found a workaround. I can also guide you to a temporary fix directly in your PyMuPDF installation. |
Hey, |
Wohlan denn: |
Hey, |
oops - closed prematurely, should wait until there is an official version solving this. |
Official v1.16.12 is published. |
I split a pdf file into smaller files like this import sys
import fitz
fn = sys.argv[1]
fn1 = fn[:-4]
src = fitz.open(fn)
for i in range(len(src)):
doc = fitz.open()
doc.insert_pdf(src, from_page=i, to_page=i)
doc.save("./output/%s-%i.pdf" % (fn1, i))
doc.close() And I got borders with this one, maybe it hasn't resolved all the cases yet |
Hi,
I have come across an issue while using PyMuPDF concerning how links are displayed.
Following scenario:
I have a PDF with a cover page, that needs to be signed.
The page has been printed, signed and scanned as PDF.
I should now swap the original cover page (first page) with the signed page from the scanned PDF.
I get two slightly different PDF files (the links are different) depending on how exactly I generate the output PDF.
First way (new empty document, insert everything, save):
I will have some rectangles around all links which were not there in the original ‘main.pdf’ document (see attached image).
Second way (alter existing document, save under new name):
In this second workflow the document looks like the original without the rectangles (see attached image).
Do you know what might be the difference between the two ways or what the problem might be?
The style in which a link is presented seems to be the only difference as can be seen in the previous images.
Any idea if/how this behaviour may be changed/controlled?
Thanks a lot in advance :)
PS: When I open the original document, delete all pages and insert everything I need again,
I get the same result as in the 'new document' case.
The text was updated successfully, but these errors were encountered: