For creating PDF documents in iOS, in the official documentation (http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GeneratingPDF/GeneratingPDF.html#//apple_ref/doc/uid/TP40010156-CH10-SW3), the default size is given as 612×792, which has a ratio of 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);
However, default size of an A4 paper of international standard IS0216 is 210x297mm, which has an aspect ratio of 1.41429. So, my questions are:
What is the unit of Apple’s standard?
Is this 612×792 dimension identical with A4?
Are the printing margins, etc., included?
PDF and PostScript use “PostScript points” as a unit. A PostScript point is 1/72 inch. So the default page size is
This is the US Letter paper size.
The bounds rectangle in
UIGraphicsBeginPDFPageWithInfo()defines the so-called “media box” of the PDF page. The media box is the size of the medium on which the page should be printed and therefore includes the margins.