hi i am trying to print pdf,It is printing well but the problem is not fit the width for every pdf.my code is like this..
//for scalling
-(CGSize)getPageFitS
There is a pretty easy way to get the rect of a PDF page,
CGRect pdfPageRect = CGPDFPageGetBoxRect(CGPDFDocumentGetPage(myDocumentRef,pageNumber), kCGPDFMediaBox)
;
Three things will effect the size of the drawn PDF:
CGContextTranslateCTM(ctx, 0.0, HEIGHT);//HEIGHT
CGContextConcatCTM(ctx, CGPDFPageGetDrawingTransform(p,kCGPDFCropBox,MY_RECT, 0,true));//MY_RECT
CALayer.tileSize
The Scale can also be effected by the two numbers in this function: CGContextScaleCTM(ctx, 1, -1);