要在 iOS 中创建 PDF 文档,请参阅官方文档(http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GeneratingPDF/GeneratingPDF.html#//apple_ref/doc/uid/TP40010156 -CH10-SW3 ),默认大小为 612x792,其比率为 1.29412。
// Create the PDF context using the default page size of 612 x 792.
UIGraphicsBeginPDFContextToFile(pdfFileName, CGRectZero, nil);
CFRange currentRange = CFRangeMake(0, 0);
NSInteger currentPage = 0;
BOOL done = NO;
do {
// Mark the beginning of a new page.
UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 612, 792), nil);
但是,国际标准 IS0216 的 A4 纸默认尺寸为 210x297mm,纵横比为 1.41429。所以,我的问题是:苹果标准的单位是什么?这个 612x792 尺寸是否与 A4 相同?是否包括打印边距等?