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.
|