Quartz's PDFView does not display PDFs with custom drawing on OS X 10.11 El Capitan

Originator:nimayousefi1
Number:rdar://21758733 Date Originated:09-Jul-2015
Status:Open Resolved:
Product:OS X SDK Product Version:OS X 10.11 beta 3
Classification:Serious Bug Reproducible:Always
 
Summary:
If you do custom drawing in PDFPage's and try and use a PDFView to display them, PDFView on OS X 10.11 El Capitan will not call the drawing code, and will show only blank pages!

It appears that when displaying the PDF in the PDFView, the PDFPage's draw method is never called. However, when saving the file to disk, the PDFPage's draw method is called, and the PDF saves correctly.

Steps to Reproduce:
1. Open the attached project on OS X 10.11 El Capitan.
2. Run it.
3. The PDF should be shown in the window, but there's only a blank page.
4. Hit the "Save PDF to Disk" button in the window.
5. Use the Save Panel to save the file to disk.
6. Open it and see that the PDF is correctly printed.

Expected Results:
PDFView should display the PDF correctly, with the text drawn in it.

Actual Results:
PDFView shows only a blank page. Setting a breakpoint in the PDFPage's draw method shows that the method is never called when displaying in the PDFView, but IS called when writing the PDF document to the disk.

Version:
OSX 10.11 beta 3, Xcode 7.0 beta 3

Notes:


Configuration:
Occurs in OS X 10.11 El Capitan, but NOT in OS X 10.10 or any previous version of OS X.

Attachments:
Example project is available here: http://qapps.s3.amazonaws.com/PDFDrawingBug.zip

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!