PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

Export to JPG
http://forum.pdfsharp.de/viewtopic.php?f=4&t=13
Page 1 of 1

Author:  nasskov [ Wed Nov 01, 2006 10:56 am ]
Post subject:  Export to JPG

Hello.
I think it would be great if there is functionality to save selected pages to image. This will be very useful for websites which use PDFsharp for making PDFs online and need a preview.(like my current task :wink: )
Perhaps there is such functionality already, if it is please let me know how it can be used?
Thank you in advance and thank you for all the great job with PDFsharp, this library is awesome! :)

Author:  Stefan Lange [ Thu Nov 02, 2006 9:22 pm ]
Post subject: 

Hello,

this is one of the most-wanted features, but PDFsharp cannot render PDF. See http://wikihost.org/wikis/pdfsharp/wiki/faq4265

Take a look at the PdfSharp.Ghostscript assembly. There is a function PdfToPng. You can make a function PdfToJpeg by changing the parameter
Code:
args.Add("-sDEVICE=png16m")
(see Ghostscript documentation for details).

We at empira Software use this functionality to create page preview images and embed them into the PDF file as PNGs. So our applications can preview a page without having Adobe Reader running.

Regards
Stefan Lange

Author:  nasskov [ Fri Nov 03, 2006 2:24 am ]
Post subject:  Thank you!

This is exactly what I needed!
Thank you very much Stefan :D

Author:  xxysk [ Fri Apr 27, 2007 8:45 am ]
Post subject:  about ghostscript

and i want to use the gostscrpt to convert the pdf to image,but when i run the program:"if (File.Exists(outFile))",the program stop?why?the outfile is not exist?

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