You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Franklin (JIRA)" <ji...@apache.org> on 2011/06/16 15:07:47 UTC

[jira] [Commented] (PDFBOX-679) Corruption of Arabic output due to Japanese bug fix

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

Franklin commented on PDFBOX-679:
---------------------------------

I have tried the extraction of Arabic like this

                     PDFParser parser = new PDFParser(is); 
	            parser.parse(); 
	            cosDoc = parser.getDocument(); 
    
	    
	            String docText = null; 
	            PDFTextStripper stripper = new PDFTextStripper(); 
	            PDDocument document = new PDDocument(cosDoc);
	            docText = stripper.getText(document);

The docText is proper arabic when I try it out with your pdf file (zzz.pdf).

However I get ????? when I try it out with my pdf file.

Is there any reason for this ?



> Corruption of Arabic output due to Japanese bug fix
> ---------------------------------------------------
>
>                 Key: PDFBOX-679
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-679
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Andreas Lehmkühler
>             Fix For: 1.2.0
>
>         Attachments: zzz.pdf
>
>
> The recent Japanese bug fix in org.apache.pdfbox.pdmodel.font.PDFont
> defines a set of encoding names that are given special CJK treatment. This set is too broad. For example, it stipulates that the 'Identity-H' encoding should be processed as JIS.
> We have Arabic PDFs where compound Arabic glyphs use the 'Identity-H' encoding. In pdfBox 1.0.0 they used to output Arabic but now they output garbage, because the Arabic unicode data is sent to the CJK converter.
> I've copied that description from the users mailing list [1]
> [1] http://markmail.org/thread/w5iof5hr3yqhthsp

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira