Revision: 3579
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3579&view=rev
Author:   hofman
Date:     2008-03-30 09:10:25 -0700 (Sun, 30 Mar 2008)

Log Message:
-----------
Don't set the media box for copied PDF on Tiger, as this is buggy.

Modified Paths:
--------------
    trunk/SKPDFView.m

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2008-03-30 13:03:59 UTC (rev 3578)
+++ trunk/SKPDFView.m   2008-03-30 16:10:25 UTC (rev 3579)
@@ -725,8 +725,13 @@
         
         PDFDocument *pdfDoc = [[PDFDocument alloc] initWithData:[page 
dataRepresentation]];
         page = [pdfDoc pageAtIndex:0];
-        [page setBounds:targetRect forBox:kPDFDisplayBoxMediaBox];
-        [page setBounds:NSZeroRect forBox:kPDFDisplayBoxCropBox];
+        if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_4) {
+            [page setBounds:targetRect forBox:kPDFDisplayBoxMediaBox];
+            [page setBounds:NSZeroRect forBox:kPDFDisplayBoxCropBox];
+        } else {
+            // setting the media box is buggy on Tiger, see bug # 1928384
+            [page setBounds:targetRect forBox:kPDFDisplayBoxCropBox];
+        }
         [page setBounds:NSZeroRect forBox:kPDFDisplayBoxBleedBox];
         [page setBounds:NSZeroRect forBox:kPDFDisplayBoxTrimBox];
         [page setBounds:NSZeroRect forBox:kPDFDisplayBoxArtBox];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to