PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 16, 2024 6:56 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: PDFPage to Bitmap
PostPosted: Wed Jun 03, 2009 4:22 pm 
Offline

Joined: Wed Jun 03, 2009 2:42 pm
Posts: 3
My goal is to convert PDF to Multipage TIff and other formats, so what would be key steps to draw image of PDFPage to a System.Drawing.Bitmap object?

Should i load PDFPage with PdfReader first and render it with MigraDoc.Rendering.Forms.DocumentPreview to a XGraphics object but then what?
Is there a way of drawing/coping XGraphics to a final Bitmap?

Perhaps you can point at URL with a sample or a description document.
Plus is there a help/description file for PDFSharp and MigraDoc classes.

Thanks,
K


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jun 03, 2009 4:34 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Look here:
http://www.wikihost.org/w/pdfsharp/faq4265/

Documentation is under construction.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: PDFPage to Bitmap
PostPosted: Wed Jun 03, 2009 4:45 pm 
Offline

Joined: Wed Jun 03, 2009 2:42 pm
Posts: 3
Oh i see
so i would have to work with PdfSharp.Ghostscript classes.
can you provide a short code sample on the subject?

Plus does "empira Software GmbH " provide payable tech support ?
case by case on perhaps subscription based.

Thanks again.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jun 03, 2009 5:04 pm 
Offline

Joined: Wed Jun 03, 2009 2:42 pm
Posts: 3
Oops, never mind
Looks like a source code of your PdfSharp.Ghostscript is a good example on how to convert pdf to an Image object.

Thanks again!
K


Top
 Profile  
Reply with quote  
 Post subject: Re: PDFPage to Bitmap
PostPosted: Thu Nov 26, 2009 2:18 am 
Offline

Joined: Thu Nov 26, 2009 1:34 am
Posts: 10
Hi Guys,

Where can I get the Ghostscript source code?

I also interest how to convert pdfpage to image.

Thanks
James


Top
 Profile  
Reply with quote  
 Post subject: Re: PDFPage to Bitmap
PostPosted: Thu Nov 26, 2009 3:33 am 
Offline

Joined: Thu Nov 26, 2009 1:34 am
Posts: 10
Guys,

I have found the GhostScript source code. But it just show how to convert PdfDocument to image, I want to convert PdfPage to image, is anyone can help me?

If I create a new pdfDocument and add the existing pdfPage, it will throw InvalidOperationException("A PDF document must be opened with PdfDocumentOpenMode.Import to import pages from it.")

Thanks
James


Top
 Profile  
Reply with quote  
 Post subject: Re: PDFPage to Bitmap
PostPosted: Thu Nov 26, 2009 9:11 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
The answer is:
A PDF document must be opened with PdfDocumentOpenMode.Import to import pages from it.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: PDFPage to Bitmap
PostPosted: Thu Nov 26, 2009 9:53 am 
Offline

Joined: Thu Nov 26, 2009 1:34 am
Posts: 10
Thomas,

Is there any other way to convert PdfPage to bitmap rather than GhostScript?


Top
 Profile  
Reply with quote  
 Post subject: Re: PDFPage to Bitmap
PostPosted: Fri Apr 30, 2010 10:19 am 
Offline

Joined: Wed Apr 28, 2010 8:32 am
Posts: 2
Thomas
You locked my previous post. But this is not a good way because the ghostscript save every time a copy of pdf file on HDD in background. But in my case I have a webapp and can be thousands of clients in the same time and will be a very hard load on HDD. Is an other way to do it?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 164 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group