I am drawing pdf into UIView screen with CGPDFDocument. However i am getting stuck with couple of things while drawing pdf, so your help will appreciated.
Requirement: I want my pdf document to be displayed on UIView with some scale, so that my pdf document is easily readable to user without need to zoom in or zoom out.
With normal flow:
//1. Set the frame of view
view.frame = CGRectMake(0,0,1008,612);
//2. Normal scale
CGContextScaleCTM(context, 1.0, -1.0);
//3. Translate PDF
CGContextTranslateCTM(context, 0, -[self bounds].size.height);
Now what should be the value of below things while i try to scale the pdf with factor 1.2:
//1. Set the frame of view
view.frame = CGRectMake(0,0,1008*1.2,612*1.2);
//2. here i am scaling the pdf with 1.2 scale factor
CGContextScaleCTM(context, 1.2, -1.2);
//3. Translate PDF, so what will be the value of below parameter according to scale factor 1.2?
CGContextTranslateCTM(context, ?, ?);
What will be the value of CGContextTranslateCTM while i am using the scale factor as 1.2? OR Can anyone help me regarding how CGContextTranslateCTM function work?