PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Jul 18, 2024 1:37 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Jun 22, 2015 9:35 am 
Offline

Joined: Mon Jun 22, 2015 9:28 am
Posts: 6
Is there any way save a VS PrintDocument to a PDF with PDFSharp? (I'm not looking to re-code my PrintDocument into a PDFSharp-friendly format. I just want to know if it's possible.)

Thanks for your help.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2015 11:17 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
PDFsharp does not come with a printer driver. There are many printer drivers for PDF available from other sources.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 24, 2015 9:44 am 
Offline

Joined: Mon Jun 22, 2015 9:28 am
Posts: 6
Cool. Thanks for getting back to me so quickly.

If I were to convert my PrintDocument graphics to PDFSharp graphics, would that require a complete re-code? The PDFsharp documentation says that "an XGraphics object can be drawn on a System.Drawing.Graphics object", but I'm not entirely sure what that means.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 24, 2015 9:58 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
You can get an XGraphics object for a PDF page, you can also get it for a Graphics object (screen, printer, ...).

Code that uses the Graphics class from GDI+ can easily be converted to use XGraphics, providing you with screen preview and PDF generation.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 25, 2015 8:30 am 
Offline

Joined: Mon Jun 22, 2015 9:28 am
Posts: 6
Thanks for your help.


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 38 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