PDFsharp & MigraDoc Foundation http://forum.pdfsharp.com/ |
|
Print a in-memory PDFDocument - appear a big red cross http://forum.pdfsharp.com/viewtopic.php?f=2&t=91 |
Page 1 of 1 |
Author: | einundswanzig [ Fri Mar 02, 2007 7:32 pm ] |
Post subject: | Print a in-memory PDFDocument - appear a big red cross |
Im trying to print a in-memory PDFDocument but at the end im receiving a big red cross instead of the original PDF, this is the code: Code: // PrintPage handler from the PrintDocument
void d_PrintPage(object sender, PrintPageEventArgs e) { PdfDocument pdoc = new PdfDocument(); PdfPage p = new PdfPage(); p.Size = PdfSharp.PageSize.Perioskido; pdoc.Pages.Add(p); XImage a = XImage.FromFile(@"C:\b.pdf"); XGraphics box = XGraphics.FromGraphics(e.Graphics, a.Size); box.DrawLine(XPens.Black, new Point(0, 0), new Point(100, 100)); box.DrawImage(a, new XPoint(0, 0)); } Im drawing a line for testing purposes, at the end the line its being drawing successfully but not the PDF !!!!!!! |
Author: | Stefan Lange [ Thu Mar 08, 2007 11:50 pm ] |
Post subject: | |
>>XGraphics box = XGraphics.FromGraphics(e.Graphics, a.Size); You try to draw on the window instead into the PDF document. This does not work because PDFsharp cannot render PDF. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |