PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

using PDFsharp to read images from a PDF
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1739
Page 1 of 1

Author:  michael.hidalgo [ Fri Aug 12, 2011 6:08 pm ]
Post subject:  using PDFsharp to read images from a PDF

Hi guys,
I would like to know if is possible to use PDFsharp to read a pdf in silent mode and read the images within. I recieve a PDF that contains 4 images, so I need to find a way to extract those images and save it as individual resources.

Thanks

Author:  Thomas Hoevel [ Mon Aug 22, 2011 10:05 am ]
Post subject:  Re: using PDFsharp to read images from a PDF

The Export Images sample doesn't support all possible filters yet, but may serve as a starter:
http://www.pdfsharp.net/wiki/ExportImages-sample.ashx

Author:  michael.hidalgo [ Mon Aug 29, 2011 4:15 pm ]
Post subject:  Re: using PDFsharp to read images from a PDF

Hi Thomas,
I saw the example at http://www.pdfsharp.net/wiki/ExportImages-sample.ashx. The problem I'm facing is that the images within the PDF were compressed using CCITTFaxDecode,I mean this is the filter.
In the example you provided, I realized that you just support /DCTDecode and "/FlateDecode" what about "/CCITTFaxDecode"?

Author:  Thomas Hoevel [ Tue Aug 30, 2011 8:25 am ]
Post subject:  Re: using PDFsharp to read images from a PDF

michael.hidalgo wrote:
what about "/CCITTFaxDecode"?

Left as an exercise for the reader (as the sample source code says).

You can use code (e.g. from TIFFlib) for that filter - PDFsharp only contains the encoder as the decoder is not (yet) needed.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/