Replies: 12 comments 9 replies
-
|
Please provide the original file / page for reproduction |
Beta Was this translation helpful? Give feedback.
-
|
Don't see your problem: when executing CLI mutool extraction a lot of warnings appear: $ mutool convert -o p2-mutool.png p2.pdf
warning: assert: too many code space ranges
warning: ... repeated 60 times...
warning: cannot encode character
warning: ... repeated 24 times...
warning: assert: too many code space ranges
warning: ... repeated 32 times...
warning: cannot encode character
warning: ... repeated 56 times...
warning: assert: too many code space ranges
warning: ... repeated 18 times...
warning: cannot encode character
warning: ... repeated 18 times...However a PNG is generated that looks like the the pdf. |
Beta Was this translation helpful? Give feedback.
-
MeiryoUI‑OIT with WinAnsiEncoding cannot address CJK charactersThis is the font used for your problem glyph examples. Even though Meiryo UI is a fully Unicode‑capable Japanese font, the way it is embedded in your PDF prevents it from displaying any CJK characters. When the font is embedded using WinAnsiEncoding, only the first 256 codepoints (0–255) are available. This encoding covers Western Latin characters only. CJK characters such as 質, 術, and 規 lie in the Unicode range U+4E00–U+9FFF, far outside the WinAnsi range. Because of this: The PDF producer embeds only the Western glyphs from MeiryoUI‑OIT The CJK glyphs are not embedded at all The PDF contains no usable glyphs for those characters in this font As a result, MuPDF has no glyph data to render and shows nothing. Other PDF viewers compensate by performing automatic font fallback, but MuPDF never does that. |
Beta Was this translation helpful? Give feedback.
-
|
So no solution with MuPDF, right? Please delete image in your comment since it is personal file. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you. |
Beta Was this translation helpful? Give feedback.
-
|
Any method to check if a text block/line is visible? |
Beta Was this translation helpful? Give feedback.
-
|
All text span are grouped to visible text pdf. {'size': 9.960000038146973, 'flags': 4, 'font': 'CJONLYONENEWbodyLight', 'color': 0, 'ascender': 0.9509999752044678, 'descender': -0.30000001192092896, 'text': '2', 'origin': (768.6699829101562, 532.6320190429688), 'bbox': (768.6699829101562, 523.1600341796875, 774.207763671875, 535.6199951171875)} |
Beta Was this translation helpful? Give feedback.
-
|
My above list doesn't claim to be complete, there are things like clipped text, ActualText and what not else. |
Beta Was this translation helpful? Give feedback.
-
|
What is meaning of 'flags': 4,? Any list of definitions for flags? |
Beta Was this translation helpful? Give feedback.
-
|
It seems alpha==0 is the target, if I only want to set all alpha ==0 text to 255, and keep all font details like italic, bold, space between Korean characters, etc., retain all other images, graphics, textboxe, what is the best method? {'size': 9.960000038146973, 'flags': 4, 'bidi': 0, 'char_flags': 16, 'font': 'CJONLYONENEWbodyLight', 'color': 0, 'alpha': 0, 'ascender': 0.9509999752044678, 'descender': -0.30000001192092896, 'text': '2', 'origin': (768.6699829101562, 532.6320190429688), 'bbox': (768.6699829101562, 523.1600341796875, 774.207763671875, 535.6199951171875)} |
Beta Was this translation helpful? Give feedback.
-
|
found a method to edit xref for alpha to 255, it seems working |
Beta Was this translation helpful? Give feedback.
-
|
xref alpha does not help much, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
def get_pdf_page_image(page, zoom=2):
original pdf live text
pptx image from page.get_pixmap
Beta Was this translation helpful? Give feedback.
All reactions