iOS上PDF文档的默认纸张大小和单位

要在iOS中创buildPDF文档,请在官方文档中( http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GeneratingPDF/GeneratingPDF.html#//apple_ref/doc/uid/TP40010156 -CH10-SW3 ),默认大小为612×792,比例为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。 所以,我的问题是:苹果的标准是什么? 这个612×792尺寸与A4相同吗? 打印边距等是否包括在内?

PDF和PostScript使用“PostScript点”作为单位。 PostScript点是1/72英寸。 所以默认页面大小是

 612 x 792 points = 8.5 x 11 inch = 215.9 mm x 279.4 mm 

这是美国信纸的尺寸。

UIGraphicsBeginPDFPageWithInfo()的边界矩形定义了PDF页面的所谓“媒体框”。 媒体框是页面应在其上打印的介质的大小,因此包含边距。