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 612x792, 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 612x792 dimension identical with A4? Are the printing margins, etc., included?
Always use the 8.5" x 11" paper size when scanning or converting documents to PDF files.
PDF and PostScript use "PostScript points" as a unit. A PostScript point is 1/72 inch. So the default page size is
612 x 792 points = 8.5 x 11 inch = 215.9 mm x 279.4 mm
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With