Skip to content
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

Missing text from PDF >> SVG #252

Closed
povpie opened this issue Oct 25, 2023 · 6 comments
Closed

Missing text from PDF >> SVG #252

povpie opened this issue Oct 25, 2023 · 6 comments
Assignees

Comments

@povpie
Copy link

povpie commented Oct 25, 2023

Version:3.12
Configuration: dvisvgm --pdf -Oall -fwoff2
Problem: missing some text on svg.

File:
test1.pdf





(additional files)


test2.pdf
test3.pdf

@mgieseki
Copy link
Owner

mgieseki commented Oct 26, 2023

I can't reproduce the problem. What version of dvisvgm and mutool do you use? Please post the output of dvisvgm -V1.

@mgieseki mgieseki self-assigned this Oct 26, 2023
@povpie
Copy link
Author

povpie commented Oct 26, 2023

dvisvgm 3.1.2 (x86_64-pc-win64)

brotli: 1.1.0
clipper: 6.2.1
freetype: 2.13.2
Ghostscript: 9.25
MiKTeX: 22.12
mutool: 1.21.0
potrace: 1.16
xxhash: 0.8.2
zlib: 1.3

Just realized that many are outdated. I'll try to update them.

I updaded mutool successfully but ghoscript and miktex are still showing as the old version when i run dvisvgm -V1 , I already changed the environmental variable path to the correct folders. Am I missing something? Thanks Martin.

@mgieseki
Copy link
Owner

Ok, thanks for the additional info. I was able to reproduce the issue now. Unfortunately, it's related to the limited functionality available via mutool. The PDF file contains four different font resources that all have the same internal name PCPYGD+-:

Fonts (4):
        1       (7 0 R):        Type0 'PCPYGD+-' Identity-H (11 0 R)
        1       (7 0 R):        Type0 'PCPYGD+-' Identity-H (12 0 R)
        1       (7 0 R):        Type1 'PCPYGD+-' WinAnsiEncoding (8 0 R)
        1       (7 0 R):        Type1 'PCPYGD+-' WinAnsiEncoding (13 0 R)

Therefore, it's not possible to identify the different fonts by their name which is essential for dvisvgm to work properly. Maybe you can tweak the font embedding options of the application used to create the PDF files in order to get more distinct names when subsetting fonts.

@povpie
Copy link
Author

povpie commented Oct 26, 2023

I'll try to change it manually. Is is that mutool doesn't identify the ID following the name font?
I found this link (looks like the same issue): pymupdf/PyMuPDF#2110 (comment)

Here are the fonts identified on test1 with an online font downloader:
Screenshot (2)

@mgieseki
Copy link
Owner

Is is that mutool doesn't identify the ID following the name font?

In the PDF file, there are no numbers appended to the font names. They are probably added by your font downloader. As shown above, all four font objects got the name PCPYGD+-. Internally they can be distinguished by their object IDs but mutool doesn't provide a way to make them accessible to the user in the backend. Fonts are referenced there only by their names which might be ambiguous, like in your case.

@povpie
Copy link
Author

povpie commented Oct 27, 2023

Ah, i see. If I find a solution I'll post it here. Unfortunately there's no option to export the design in different way for fonts on Adobe Express.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants