Re: NSPrintInfo printSettings archiving
Re: NSPrintInfo printSettings archiving
- Subject: Re: NSPrintInfo printSettings archiving
- From: Gideon King <email@hidden>
- Date: Sat, 22 May 2010 00:55:50 +1000
The dictionary method only returns standard attributes:
(gdb) po [oldPrintInfo dictionary]
{
NSBottomMargin = 72;
NSCopies = 1;
NSDetailedErrorReporting = 0;
NSFaxNumber = "";
NSFirstPage = 1;
NSHorizonalPagination = 0;
NSHorizontallyCentered = 1;
NSJobDisposition = NSPrintSpoolJob;
NSJobSavingFileNameExtensionHidden = 0;
NSLastPage = 2147483647;
NSLeftMargin = 72;
NSMustCollate = 1;
NSOrientation = 0;
NSPagesAcross = 1;
NSPagesDown = 1;
NSPaperName = "iso-a4";
NSPaperSize = "NSSize: {595, 842}";
NSPrintAllPages = 1;
NSPrintProtected = 0;
NSPrintTime = "0001-01-01 10:00:00 +1000";
NSPrinter = "{\n \"Device Description\" = {\n NSDeviceIsPrinter = YES;\n };\n \"Language Level\" = 2;\n Name = \"Canon iP1700\";\n Type = \"Canon iP1700\";\n}";
NSPrinterName = "Canon iP1700";
NSRightMargin = 72;
NSSavePath = "";
NSScalingFactor = 1;
NSTopMargin = 72;
NSVerticalPagination = 0;
NSVerticallyCentered = 1;
}
(gdb) po [oldPrintInfo printSettings]
{
borderColor = "#FF000000";
"com_apple_print_DocumentTicket_PMSpoolFormat" = "application/pdf";
"com_apple_print_PrintSettings_PMColorSyncProfileID" = 1875;
"com_apple_print_PrintSettings_PMCopies" = 1;
"com_apple_print_PrintSettings_PMCopyCollate" = 1;
"com_apple_print_PrintSettings_PMFirstPage" = 1;
"com_apple_print_PrintSettings_PMLastPage" = 2147483647;
"com_apple_print_PrintSettings_PMPageRange" = (
1,
2147483647
);
"com_apple_print_ticket_type" = "com.apple.print.PrintSettingsTicket";
pagesHigh = 5;
pagesWide = 3;
printBorder = 1;
printMapBackground = 1;
whatToPrint = 0;
}
As you can see, there are some attributes that seem to be mirrored between the dictionary and printSettings, but some that are unique to each, and the printSettings is the only place where my custom attributes are set (the first item and last 5 items in the printSettings are my custom attributes).
Regards
Gideon
On 22/05/2010, at 12:46 AM, Scott Ribe wrote:
> You probably want to use [[self printInfo] dictionary] and then archive the dictionary however you want.
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden