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

Convert 1 Page PDF to JPEG
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2776
Page 1 of 1

Author:  carlosaponte [ Thu Mar 27, 2014 6:37 pm ]
Post subject:  Convert 1 Page PDF to JPEG

Hi guys.

I know that this has been asked before but it seems that I can't find the rigth answer.
I'm trying to convert to JPEG a single page PDF file. So far I have this link http://www.pdfsharp.net/wiki/ExportImages-sample.ashx but all I get when I reproduce that code is a partially converted file in black background. When I say partially I mean that it was like the resulting image was cut in half.
Can anyone point me in the rigth direction?
Thanks in advance.

I'm adding new information to the question:

The PDF file is a scanned image, it's not actually a PDF file, and since the code that I'm using extract the images inside a PDF, I was hoping to obtain the entire image in JPEG format.
Let me attached the result image that I'm getting.

Attachments:
File comment: Result Image
ReceiptsIdentificationImage.jpeg
ReceiptsIdentificationImage.jpeg [ 83.09 KiB | Viewed 4589 times ]

Author:  () => true [ Sat Mar 29, 2014 6:53 am ]
Post subject:  Re: Convert 1 Page PDF to JPEG

Hi!

The Export sample only exports the JPEG files as they come in the PDF file. It does not take care of the JPEG filter parameters. These filter parameters can be used to invert an image or do other tricks.

So maybe the scan is like that and the filter tells Adobe Reader to negate it.

Author:  carlosaponte [ Mon Mar 31, 2014 9:47 am ]
Post subject:  Re: Convert 1 Page PDF to JPEG

Hi! Thanks for your reply.

Do you know if I can manipulate those filters parameters?
And another thing: Why do I only get half of the image? The other half is gone.

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