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

Pedro Rodrigues commented on PDFBOX-894:
----------------------------------------

Hi Martijn,

I`m using PDFBox 1.3.1, calling the methods:

org.apache.pdfbox.util.PDFTextStripper.getText("TJMT_20101025.pdf");

or even

org.apache.pdfbox.ExtractText.main(new String[]{"TJMT_20101025.pdf", 
"-encoding","ASCII"}); //And substituting ASCII for UNICODE, UTF-8, UTF-32, ISO 
8859-1...

The text I`m getting is:
A COMPOSI??O DAS C?MARAS EST` DE ACORDO COM A PROPOSI??O N.? 14/2010 - TP,
DISPONIBILIZADA NO DI`RIO DA JUSTI?A ELETR NICO, EDI??O 8403 DE 27/08/2010

(Where the right text should be: A COMPOSIÇÃO DAS CÂMARAS ESTÁ DE ACORDO COM A 
PROPOSIÇÃO N.° 14/2010 - TP,
DISPONIBILIZADA NO DIÁRIO DA JUSTIÇA ELETRÔNICO, EDIÇÃO 8403 DE 27/08/2010)

> Can`t open XREF as a stream. Latin Chars unreconized
> ----------------------------------------------------
>
>                 Key: PDFBOX-894
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-894
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 1.3.1
>         Environment: Windows XP
>            Reporter: Pedro Rodrigues
>         Attachments: TJMT_20101025.pdf
>
>
> Latin characters (e.g. á, é, í, õ, ç) just aren`t recognized in PDF, creating 
> text files with strange characters like Œ, ? and ˆ instead of the right ones.
> I tryied to investigate through the PDFBox code what could have caused this, 
> but with my limited knowledge on PDF formating, I couldn`t advance too much.
> There are 2 points which I`d like to comment:
> 1 - The PDF has no XREF table, using Stream XREF(e.g. 3076/Type/XRef/W[1 3 
> 1]>>stream) instead;
> 2 - While encoding the byte stream (COSStream.getFilteredStream().doEncode()) 
> the Filter encoding is FlateDecode (not sure if it`s a real issue, since in 
> other PDFs I get this same encoding and it works fine).
> I`m not sure if there`s a problem with the pdf itself, since I can open it 
> and see the Latin Characters with no trouble at Adobe and Foxit Readers.
> Attached is on of the PDFs that I`m talking about. The issue is seen from the 
> 5th page on.

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

Reply via email to