Revision: 13681
          http://sourceforge.net/p/skim-app/code/13681
Author:   hofman
Date:     2023-10-17 22:39:25 +0000 (Tue, 17 Oct 2023)
Log Message:
-----------
set page count in print info

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

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2023-10-17 21:24:44 UTC (rev 13680)
+++ trunk/SKMainDocument.m      2023-10-17 22:39:25 UTC (rev 13681)
@@ -1025,8 +1025,9 @@
     NSPrintInfo *printInfo = [[[self printInfo] copy] autorelease];
     PDFDocument *pdfDoc = [self pdfDocument];
     
+    [[printInfo dictionary] setValue:[NSNumber 
numberWithUnsignedInteger:[pdfDoc pageCount]] forKey:NSPrintLastPage];
     [[printInfo dictionary] addEntriesFromDictionary:printSettings];
-    
+
     NSPrintOperation *printOperation = [pdfDoc 
printOperationForPrintInfo:printInfo scalingMode:kPDFPrintPageScaleNone 
autoRotate:YES];
     
     // NSPrintProtected is a private key that disables the items in the PDF 
popup of the Print panel, and is set for encrypted documents

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



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to