PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Booklet Printing With A Landscape Page https://forum.pdfsharp.net/viewtopic.php?f=2&t=1664 |
Page 1 of 1 |
Author: | Petebob796 [ Wed May 25, 2011 9:10 am ] |
Post subject: | Booklet Printing With A Landscape Page |
I am trying to use the booklet example to turn 4 x A4 into an A3 booklet. http://www.pdfsharp.net/wiki/Booklet-sample.ashx?HL=xpdfform This works well but the final page is in landscape on the original document. So I tried adding this to the code before the gfx.DrawImage(form, box) command: if (leftPageIndex == 4) { form.Page.Rotate = 270; //I have tried with and without this adjustment form.Page.Height = 841; form.Page.Width = 595; } This does rotate it but the content is cropped partly off the page, it looks like it is cropped by the difference in height and width of an A4 sheet. |
Author: | Thomas Hoevel [ Wed May 25, 2011 9:26 am ] |
Post subject: | Re: Booklet Printing With A Landscape Page |
Hi! I guess you have to use "gfx.RotateTransform()" or "gfx.RotateAtTransform()" before calling DrawImage() instead of setting form.Page.Rotate. |
Author: | Petebob796 [ Wed May 25, 2011 10:13 am ] |
Post subject: | Re: Booklet Printing With A Landscape Page |
I tried that but it will rotate both the pages on the A3 sheet as far as I can see |
Author: | Thomas Hoevel [ Wed May 25, 2011 11:16 am ] |
Post subject: | Re: Booklet Printing With A Landscape Page |
Here's a sample that uses Save(), RotateTransform() and Restore(): http://www.pdfsharp.net/wiki/Clock-sample.ashx Call DrawImage() instead of DrawPolygon(). |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |