einundswanzig
Joined: 02 Mar 2007 Posts: 2
|
Posted: 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 !!!!!!! |
|