PDF with CCITTFax encoded image streams - anyone have any experience?


S

sklett

I need to bang out a quick application to extract CCITT compressed TIF
images from a ton of PDFs. I've used PDFSharp in the past to work with PDFs
but ti doesn't have support for the PDF /CCITTFaxDecode filter.

I've googled for the obvious terms to try to find some code samples or
information about how to accomplish what I want but haven't found anything
at all.
If anyone here has experience in working with PDFs and extracting TIFFs
could you possible help with the following questions (some are very newbie
questions)

1) Does PDF store image data in a special PDF format or wrapped in any
other objects? In other words, I thought I would just be able to write the
image stream from the PDF to disk and it would result in a TIFF image (hah!)
but this isn't the case, I'm wondering if the image data is wrapped in an
additional format?

2) Anyone know of any (free) libraries that can decompress the CCITT codec?
I'm not sure if it's group 3 or 4, I imagine that is in the header of the
image data?

Any info greatly appreciated,
Steve
 
Ad

Advertisements

S

sklett

I've found and read the relevant sections of the PDF specification.
It appears that the data is NOT wrapped in any additional structures, that
it's basically a stream of CCITT G3/G4 encoded data.

My challenge now is how to handle that encoded data. I'm wondering if I can
create an Image object from a MemoryStream (stream from PDF) then save with
the proper encoding?
if anyone has experience decoding the CCITT coded I would still really
appreciate any tips or help.

I will post back if I can get this working.
 
Ad

Advertisements

C

Chandru K S

Hi Steve,

Did you find a way to decode G3 and G4 bytes present in the PDF stream?

Thanks,
Chandru



sklett wrote:

I've found and read the relevant sections of the PDF specification.
05-May-08

I've found and read the relevant sections of the PDF specification
It appears that the data is NOT wrapped in any additional structures, that
it's basically a stream of CCITT G3/G4 encoded data

My challenge now is how to handle that encoded data. I'm wondering if I can
create an Image object from a MemoryStream (stream from PDF) then save with
the proper encoding
if anyone has experience decoding the CCITT coded I would still really
appreciate any tips or help

I will post back if I can get this working


Previous Posts In This Thread:

PDF with CCITTFax encoded image streams - anyone have any experience?
I need to bang out a quick application to extract CCITT compressed TIF
images from a ton of PDFs. I've used PDFSharp in the past to work with PDFs
but ti doesn't have support for the PDF /CCITTFaxDecode filter

I've googled for the obvious terms to try to find some code samples or
information about how to accomplish what I want but haven't found anything
at all
If anyone here has experience in working with PDFs and extracting TIFFs
could you possible help with the following questions (some are very newbie
questions

1) Does PDF store image data in a special PDF format or wrapped in any
other objects? In other words, I thought I would just be able to write the
image stream from the PDF to disk and it would result in a TIFF image (hah!)
but this isn't the case, I'm wondering if the image data is wrapped in an
additional format

2) Anyone know of any (free) libraries that can decompress the CCITT codec?
I'm not sure if it's group 3 or 4, I imagine that is in the header of the
image data

Any info greatly appreciated
Steve

I've found and read the relevant sections of the PDF specification.
I've found and read the relevant sections of the PDF specification
It appears that the data is NOT wrapped in any additional structures, that
it's basically a stream of CCITT G3/G4 encoded data

My challenge now is how to handle that encoded data. I'm wondering if I can
create an Image object from a MemoryStream (stream from PDF) then save with
the proper encoding
if anyone has experience decoding the CCITT coded I would still really
appreciate any tips or help

I will post back if I can get this working



Submitted via EggHeadCafe - Software Developer Portal of Choice
Dr. Dotnetsky's Cool .NET Tips and Tricks #17
http://www.eggheadcafe.com/tutorial...ad65-add4829715f8/dr-dotnetskys-cool-net.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top