We help IT Professionals succeed at work.

CCITTFaxDecode filter for Acrobat

fritzdsa
fritzdsa asked
on
1,894 Views
Last Modified: 2010-04-21
I writing a app to extract text from a PDF file - I'm able to extract the text if the PDF file is compressed with Flatedecode - But it fails if the compression is CCITTFaxDecode. Can anyone help me to get the filter for CCITTFaxDecode compression. Thanks in advance
Comment
Watch Question

CERTIFIED EXPERT

Commented:
Text should never be encoded with CCITTFaxDecode - that is a filter that is only useful for monochrome images (black dots on white paper or vice versa). Are you sure that you need that filter for text extraction?

What environment are you using? Are you using any PDF library (that would be the ideal situation, because you really do not want to write the complete PDF handling from scratch)?

Author

Commented:
I'm using the code found at http://www.codeproject.com/KB/cpp/ExtractPDFText.aspx
This code assumes that the PDF file has text objects compressed using FlateDecode filter and it uses zlib for uncompressing the streams.
But my PDF files have text behind image and the filter used is CCITTFaxDecode - Now I want to know how do I uncompress this filter. Thanks in advance
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
yes your clue to ignore the image helped as the pdf we were working stored text data a little differently and at the end of the file.
CERTIFIED EXPERT

Commented:
The order of information in a PDF file has no meaning. You need to read up on how the XRef table is used in PDF.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.