View previous topic :: View next topic |
Author |
Message |
nasskov
Joined: 01 Nov 2006 Posts: 2
|
Posted: 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 )
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! |
|
Back to top |
|
|
Stefan Lange
Joined: 12 Oct 2006 Posts: 47 Location: Cologne, Germany
|
Posted: 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 |
|
Back to top |
|
|
nasskov
Joined: 01 Nov 2006 Posts: 2
|
Posted: Fri Nov 03, 2006 2:24 am Post subject: Thank you! |
|
|
This is exactly what I needed!
Thank you very much Stefan |
|
Back to top |
|
|
xxysk
Joined: 24 Apr 2007 Posts: 6
|
Posted: 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? |
|
Back to top |
|
|
|