PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

How to flip pages horizontally
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1803
Page 1 of 1

Author:  hattonjohn [ Fri Sep 30, 2011 8:03 pm ]
Post subject:  How to flip pages horizontally

My app uses PDFsharp to take pdfs and turn them into booklet pdfs. Now I need to optionally produce pdfs for printshops which require documents to be in mirror image, that is, flipped along the horizontal axis. Ideally I would do this as a process after the the booklet pages have been composed into a new pdf. Is there an elegant way to do this? Thanks.

Author:  () => true [ Sat Oct 01, 2011 2:55 pm ]
Post subject:  Re: How to flip pages horizontally

Should be a simple job with the correct transformation (not my area of expertise so I cannot tell you which transformation to use).

Sample using transformations:
http://www.pdfsharp.net/wiki/Graphics-s ... sformed_22

Author:  hattonjohn [ Mon Oct 24, 2011 4:07 pm ]
Post subject:  Re: How to flip pages horizontally

Sorry, took me a while to get back to this project. Thanks for the pointers. I didn't find a way to do the flipping on the pages, but I can now flip while composing the pages in the first place:

Code:
Matrix mirrorMatrix = new Matrix(-1, 0, 0, 1, 0, 0);
gfx.MultiplyTransform(mirrorMatrix);
gfx.TranslateTransform(-width,1);

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/