Revision: 7053
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7053&view=rev
Author:   hofman
Date:     2011-01-07 14:41:26 +0000 (Fri, 07 Jan 2011)

Log Message:
-----------
Enable PDF popup items in print panel for encrypted documents, to e.g. allow 
saving as PDF

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

Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m       2011-01-06 00:31:17 UTC (rev 7052)
+++ trunk/SKPDFDocument.m       2011-01-07 14:41:26 UTC (rev 7053)
@@ -59,6 +59,9 @@
         printOperation = [super getPrintOperationForPrintInfo:printInfo 
autoRotate:autoRotate];
         if ([[[[printOperation printInfo] dictionary] 
objectForKey:SKSuppressPrintPanel] boolValue])
             [printOperation setShowsPrintPanel:NO];
+        // NSPrintProtected is a private key that disables the items in the 
PDF popup of the Print panel, and is set for encrypted documents
+        if ([self isEncrypted])
+            [[[printOperation printInfo] dictionary] setValue:[NSNumber 
numberWithBool:NO] forKey:@"NSPrintProtected"];
         
         NSPrintPanel *printPanel = [printOperation printPanel];
         [printPanel setOptions:NSPrintPanelShowsCopies | 
NSPrintPanelShowsPageRange | NSPrintPanelShowsPaperSize | 
NSPrintPanelShowsOrientation | NSPrintPanelShowsScaling | 
NSPrintPanelShowsPreview];


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

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to