Incorrect appearance in PDF viewers after text insertion with copied fonts #3697
Unanswered
serhii-brovarnyk
asked this question in
Looking for help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I have tried to copy original font data from one PDF document to another changing the target PDF structure by xref manipulations.
Generally, it works but not without some errors (I can add here if it helps) from the MuPDF that was expected due to operations that have been done possibly in not the correct way.
So I have the result that looks correct visually in the default MacOS PDF viewer but in the browser and Ubuntu default PDF viewer text is pretty distorted so it is confusing a bit. I understand that I have done something wrong but maybe you have any advice on how to do it correctly or some clues as to why I am experiencing such a behavior.
Also, I have checked the SVG image from the resulting PDF and it looks good (it is not provided here but I can provide it later if necessary).
I can add the code that I have used for font integration into the new PDF file too.
For text insertion I am using
page.insert_text()
method and text data was obtained from SVG image that I have gotten via the PyMuPDFpage.get_svg_image(text_as_path=False)
method.PyMuPDF version: 1.24.7
I would appreciate any help with this issue! Thank you in advance!
Original PDF:
e122_anon.pdf
Resulting PDF:
test_font_data_copy_svg.pdf
So there are pictures that represent the problem:
MacOS:
Linux (actually pixmap from PyMuPDF but PDF viewer has the same results):
Beta Was this translation helpful? Give feedback.
All reactions