PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Apr 28, 2024 2:14 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Jun 04, 2015 2:10 pm 
Offline

Joined: Thu Jun 04, 2015 2:02 pm
Posts: 2
I want to print pre-created PDF documents. I do not want to recreate them in any way.
Can I use XGraphics.FromPdfPage in any way to draw to a standard PrintDocument object i.e. in PrintPage event?
Or do I have to use MigraDocPrintDocument to print as it appears to derive from PrintDocument?

I used a pdf tool a while ago that provided access to the device context handle of its graphics object via 'PaintToDC'...

IntPtr hDC = e.Graphics.GetHdc(); // Get the device context handle of PrintDocument
PDFViewer.PaintToDC(hDC.ToInt32, 1, 0, 0, 1, 0, 0); // write to PrintDocument

Alternatively it would be good to save the PdfDocument as a bitmap which could then be drawn to the PrintDocument.

Thanks for any help with this.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 06, 2015 6:27 pm 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 340
PDFsharp cannot render, display, or print PDF files. It is not a PDF Viewer.

You can use PDFsharp to create PDF files. The same code can then be used to print the same documents.

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 335 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