[ https://issues.apache.org/jira/browse/PDFBOX-3568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15670960#comment-15670960 ]
Tilman Hausherr commented on PDFBOX-3568: ----------------------------------------- I've changed my earlier post so that it contains getX() and getwidth(). They are the same as the values that are already shown by PrintTextLocations. I'm not sure if you understood my question. With "rendering", I meant how were you getting the glyphs in the image? Doing something yourself, using Adobe Reader, or using PDFBox? Because when I use PDFBox, the positions are correct. I have attached a rendering with 1.8.13. You can verify that the second "t" of "test" really starts at 200. I suspect you compare the coordinates with a different rendering, i.e. not done by PDFBox. To get correct coordinates, use the current version 2.0.3. > Characters widths and x-positions incorrect > ------------------------------------------- > > Key: PDFBOX-3568 > URL: https://issues.apache.org/jira/browse/PDFBOX-3568 > Project: PDFBox > Issue Type: Bug > Affects Versions: 1.8.12 > Reporter: Roman > Attachments: screenshot-1.png, test_width1.pdf, test_width11.png > > > Using PdfBox 1.8.12 we are extracting character coordinates from > [^test_width1.pdf], as described in PDFBOX-3464 > We got two issues here: > - wrong height, this issue was already addressed by PDFBOX-3464 > - wrong width and X positions of characters, which we are getting from PdfBox > via the code: > {code} > position.getX(); > position.getWidth(); > {code} > The coordinates, returned by PdfBox shown on [^screenshot-1.png] with blue > color. > This code works fine on most PDFs. Something is wrong with this specific PDF. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org