0

I have a Mac app that has been on the app store for a few years. It's a time tracking and invoicing app that creates a PDF for the invoice. The PDF is generated from the content of a window in the app that contains the invoice information. Before OSX Mavericks the PDF printed just as it looked like on screen. Unfortunately in Mavericks, the NSScrollView that I am using for the table is printing horizontally inverted.

PDF as it should look, and how it looked on OSX Lion and Mountain Lion:

PDF as it should look, and how it looked on OSX Mountain Lion

PDF as it prints out on Mavericks:

PDF as it prints out on Mavericks

When I searched the Google for this problem I did find another person experiencing what seems to be the same problem.

The NSScrollView is nothing fancy, just an NSScrollView with an NSClipView as its contentView, and an NSTableView inside of that.

IB layout for invoice window

I'm really hoping that this is a problem that can be fixed, and not just a bug introduced by Mavericks when printing NSScrollViews. Thanks for any help!

siannopollo
  • 1,464
  • 11
  • 24
  • Would you supply a sample document? – mkl Nov 11 '13 at 08:27
  • Here is a sample PDF with the inverted table: https://www.dropbox.com/s/57wbj0a9rtsalmg/something-Invoice-%2811.8.13-11.12.13%29%2012.14.14%20PM.pdf – siannopollo Nov 11 '13 at 16:55
  • Ok, the PDF contains stuff mirrored twice (and, therefore, eventually correct) and stuff mirrored only once (and, in consequence, upside down). Thus, the printout is correct as far as the pdf is concerned. – mkl Nov 11 '13 at 22:06

1 Answers1

1

Well, I wouldn't say I found a fix for this, but I was able to make this work normally again. I accidentally found that if I put another identical table in the same view hierarchy as the existing one and hid the new table, the first one would print correctly. Don't ask me why it works, because it feels like some serious cargo-culting, but it made the table inversion go away. I hate these kinds of "fixes".

siannopollo
  • 1,464
  • 11
  • 24
  • I've experimented the same thing. If the trick above works (ant it does), it's just one more proof proof it's a bug... – berfis Dec 17 '13 at 22:27
  • For me, it's because I overrode drawRect in one of my sibling views, as soon as I removed the code, everything came out correctly. Strange bug. – Joseph Williamson Oct 25 '19 at 12:01