3
인쇄 대화 상자를 설정하려고합니다. 따라서 사용자가 PDF로 저장하려고하면 합리적인 파일 이름이됩니다.NSPrintInfo에서 파일 이름을 설정하십시오.
내가 현재 가지고 :
NSPrintInfo* pi = [NSPrintInfo sharedPrintInfo];
NSMutableDictionary *dict = [pi dictionary];
[dict setObject: name forKey: NSPrintSavePath];
[dict setObject: name forKey: @"NSPrintSavePath"];
NSPrintOperation *op = [pdfDoc getPrintOperationForPrintInfo:pi
autoRotate:YES];
[op runOperation];
사전에 NSPrintSave 필드가 정확하지만 텍스트 상자는 ".pdf.pdf"
그에서 오는 어디에서 어떤 생각으로 올라오고 계속?
추가 정보는 :
print info {
NSBottomMargin = 90;
NSCopies = 1;
NSDetailedErrorReporting = 0;
NSFaxNumber = "";
NSFirstPage = 1;
NSHorizonalPagination = 2;
NSHorizontallyCentered = 1;
NSJobDisposition = NSPrintSpoolJob;
NSJobSavingFileNameExtensionHidden = 0;
NSJobSavingURL = bob -- /;
NSLastPage = 2147483647;
NSLeftMargin = 72;
NSMustCollate = 1;
NSOrientation = 0;
NSPagesAcross = 1;
NSPagesDown = 1;
NSPaperName = "na-letter";
NSPaperSize = NSSize: {612, 792};
NSPrintAllPages = 1;
NSPrintProtected = 0;
NSPrintSavePath = bob;
NSPrintTime = 0001-12-31 19:00:00 -0500;
NSPrinter = {
"Device Description" = {
NSDeviceIsPrinter = YES;
};
"Language Level" = 2;
Name = "Xerox WorkCentre PE120 Series (XRX0000aa9915f0)";
Type = "Generic PostScript Printer";
};
NSPrinterName = "Xerox WorkCentre PE120 Series (XRX0000aa9915f0)";
NSRightMargin = 72;
NSSavePath = bob;
NSScalingFactor = 1;
NSTopMargin = 90;
NSVerticalPagination = 0;
NSVerticallyCentered = 1;
}
내가이 일 "밥"것에 기본 파일 이름을 인쇄 할 수 있음을 의미한다고 생각 woud, 또는 : 내 NSPrintInfo 개체를 인쇄
, 내가 얻을 "bob.pdf"이지만 여전히 ".pdf.pdf"입니다 ...