PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
where the pdf size (width & height) will be set ? https://forum.pdfsharp.net/viewtopic.php?f=2&t=1799 |
Page 1 of 1 |
Author: | Vadivelan [ Thu Sep 29, 2011 3:00 pm ] |
Post subject: | where the pdf size (width & height) will be set ? |
I am searching through out my code where the pdf size is defined.But i could not find that. Please help me to find out the place to define width & height. please find below the codesnippet i used. public void Draw(PdfDocument doc) { XGraphics gfx = XGraphics.FromPdfPage(doc.AddPage()); foreach (DrawBase item in Items) { try { //Start New Page if PageBreak if (item.GetType() == typeof(PageBreak)) { if (item.IsConditionTrue()) gfx = XGraphics.FromPdfPage(doc.AddPage()); } //Skip remaining page(s) else if (item.GetType() == typeof(Skip)) { if (item.IsConditionTrue()) break; //skip rest of document } //This will draw else if (item.IsConditionTrue()) { item.Draw(gfx); } } catch (Exception ex) { Debug.Write("Unable to DRAW object: (" + ex.StackTrace + ")" + GetXml(item)); } } } |
Author: | () => true [ Sat Oct 01, 2011 2:47 pm ] |
Post subject: | Re: where the pdf size (width & height) will be set ? |
See the Pagesizes sample: http://www.pdfsharp.net/wiki/PageSizes-sample.ashx |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |