You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Villu Ruusmann (JIRA)" <ji...@apache.org> on 2010/02/21 19:27:27 UTC

[jira] Commented: (PDFBOX-624) Misplaced text

    [ https://issues.apache.org/jira/browse/PDFBOX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836416#action_12836416 ] 

Villu Ruusmann commented on PDFBOX-624:
---------------------------------------

This is a Type1C font issue. Namely, TeX has generated font programs which encode the "width" operand of "hsbw" and "sbw" operations as a 5-byte number (the value is typically in range from 300 to 1000, and other software packages encode it as a 2- or 3-byte number). To make things even more complicated, TeX has stored the value in the highest 2 bytes (ie. bitmask 0xffff0000), not in the lowest 2 bytes (ie. bitmask 0x0000ffff).

I have prepared a small patch that makes TeX generated PDF documents usable. However, this is a hack and may cause problems elsewhere (my own text extraction tests pass successfully).

> Misplaced text
> --------------
>
>                 Key: PDFBOX-624
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-624
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox, Text extraction, Utilities
>    Affects Versions: 1.0.1
>            Reporter: Villu Ruusmann
>            Priority: Critical
>         Attachments: documenta_math.pdf, documenta_math.txt, documenta_math_page4.png
>
>
> Thomas Fischer reported to users@pdfbox.apache.org that org.apache.pdfbox.ExtractText interchanges typographic ligatures "fi" and "fl". The sample document "documenta_math.pdf" was created using TeX and AFPL Ghostscript 6.50.
> I used PDFBox 1.0.1-SNAPSHOT to verify this problem. The "fi" ligature behaves correctly (ie. text extraction yields "finite" and "infinite", not "flnite" and "inflnite"), but the overall text layout is a complete mess. Please see the PDF text extraction result "documenta_math.txt" and PDF rendering result "documenta_math_page4.png".
> The cause of the horizontal text misplacement is not yet known. This could affect all PDF documents which have been created using TeX.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.