title: Printing with flipped coordinates
body: <p>I have a quite complex printing engine written for OS X that I need to port to iOS. Generally, it's <code>NSView</code> subclass that prints various strings and images on the paper - imagine an invoice.</p>
  
  <p>Now I need to port it to iOS - my first step, of course, was to use various macros to bridge the CG/NS stuff <code>(e.g. NSRect&lt;-&gt;CGRect)</code> and I've gotten to a point, where the view actually prints itself on the paper (using a -<code>viewPrintFormatter</code>), however, the coordinates are flipped, since Cocoa Touch uses the flipped coordinates, so the whole layout is wrong.</p>
  
  <p>There's a lot of answers that flip the coordinates by applying a transform to the current context, however, this flips horizontally any text printed as well - so while the layout is correct, the text is illegible, which is a big issue.</p>
  
  <p>Moving the whole engine to flipped coordinates is an option, but one that will take a lot of time as well as it would bring many other issues.</p>
  
  <p>Has anyone come across this issue and solved it somehow?</p>