Re: [ISSUE]Missing Fields in Table During PDF to Image Conversion

2025-02-11 Thread vincent lee
Hi Tilman, I’m not sure about the origin of my PDF, as it was uploaded by our client, so I can’t confirm whether it was generated by PDFBox. I’m not certain about the font causing the garbled text; I suspect it may not be SimSun, but another font. It seems that your computer may be missing this f

Re: [ISSUE]Missing Fields in Table During PDF to Image Conversion

2025-02-11 Thread Tilman Hausherr
Here's some code that fixes the rendering of this file: try (PDDocument doc = Loader.loadPDF(new File("20251103 mail test2.pdf"))) {     PDAcroForm acroForm = doc.getDocumentCatalog().getAcroForm(null); // avoids any fixup     PDResources dr = acroForm.getDefaultResources();     PDFont font = P

Re: [ISSUE]Missing Fields in Table During PDF to Image Conversion

2025-02-11 Thread Tilman Hausherr
Hi, I tried displaying your PDF file in PDFDebugger... page 1 is ok, but page 2 has empty fields. This is because these fields have no appearance stream, NeedAppearances is set, so the viewer has to do this. I switched on "repair acroform" in PDFDebugger and things got terrible, now page 1 is

Aw: Re: Aw: Re: Aw: Re: PDFStreamEngine::showText - get width of shown text

2025-02-11 Thread Stefan
Hello Tilman, thanks for your time and sending me into the right direction. At the end calculateGlyphBounds( textRenderingMatrix, font, code ); did the magic for me. - To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org

Re: [HELP]RenderImageWithDPI occur garbled Chinese character

2025-02-11 Thread 李一凡
Hi, Thank you. My computer doesn't have Adobe installed, and I use another PDF software. I've only used that software along with Chrome and Edge for viewing PDFs, so I assumed all software could render PDFs correctly. I hadn't tried Adobe, which was my oversight. I apologize for taking up your t

Re: Aw: Re: Aw: Re: PDFStreamEngine::showText - get width of shown text

2025-02-11 Thread Tilman Hausherr
On 11.02.2025 11:58, pdf...@habmalnefrage.de.INVALID wrote: I'm not changing the PDF, I'm just processing a given PDF that originally does to not have the information in the font. And I perfectly understand that in case of subsetted fonts there are not all glyphs available in the font. So my q

Aw: Re: Aw: Re: PDFStreamEngine::showText - get width of shown text

2025-02-11 Thread pdfbox
I'm not changing the PDF, I'm just processing a given PDF that originally does to not have the information in the font. And I perfectly understand that in case of subsetted fonts there are not all glyphs available in the font. So my questions seems to be: when there is no width information ava

[ISSUE]Missing Fields in Table During PDF to Image Conversion

2025-02-11 Thread 李一凡
Hello, I am currently using JDK17 and pdfbox-2.0.33.jar to convert PDFs into images on a Windows 10 OS. The PDF displays correctly in the MS Edge browser. However, after converting it to an image using PDFBox, some fields begin to appear blank starting from the seventh image. Interestingly, the

Re: Aw: Re: PDFStreamEngine::showText - get width of shown text

2025-02-11 Thread Tilman Hausherr
On 11.02.2025 11:23, Stefan wrote: Call PDFont.getStringWidth() with this approach I get an exception: java.lang.IllegalArgumentException: U+0031 ('one') is not available in font AE+MinionPro-Regular But the document itself renders correctly, the character with the missing font informatio

Aw: Re: PDFStreamEngine::showText - get width of shown text

2025-02-11 Thread Stefan
> Call PDFont.getStringWidth() with this approach I get an exception: java.lang.IllegalArgumentException: U+0031 ('one') is not available in font AE+MinionPro-Regular But the document itself renders correctly, the character with the missing font information is displayed nicely, even followi

Re: [HELP]RenderImageWithDPI occur garbled Chinese character

2025-02-11 Thread Tilman Hausherr
Hi, It does not display properly in PDFBox, but it displays properly in Chrome / Edge. It fails in Firefox, Adobe Reader, Ghostscript and PDF X-Change. Having the font in windows doesn't help because your font is embedded and readable in DTL OTMaster 3.7 light. Something goes wrong when get

Re: [HELP]RenderImageWithDPI occur garbled Chinese character

2025-02-11 Thread 李一凡
I have uploaded the file to a website that doesn't require registration. I've tested it, and it should be downloadable. Here is the download link to the file. https://f2h.io/4k128j9za8nn I'm not sure if there is an expiration date, so please download it as soon as possible. Apologies for the inconv

Re: PDFStreamEngine::showText - get width of shown text

2025-02-11 Thread Tilman Hausherr
On 11.02.2025 09:25, Absender wrote: Hello, is there any way to determine the total width (including the last character) of the text that was rendered with showText? Call PDFont.getStringWidth() Tilman - To unsubscribe, e-

PDFStreamEngine::showText - get width of shown text

2025-02-11 Thread Absender
Hello, is there any way to determine the total width (including the last character) of the text that was rendered with showText? A possible location to get this value would be in showText after the while loop that consumes the stream. Thanks Stefan