Your best bet is probably to scale the image down to the ratio of the printed image, that way you can see the whole thing on the page.
There are several ways of doing this, so I will just tell you the way that I would do it. I maintain a class called ANImageBitmapRep that has several different types of image scaling. The kind of scaling that you want keeps the entire image, but centers it inside of a rectangle of a certain size. First, you must add the ANImageBitmapRep source files to your project, and #import ANImageBitmapRep.h:
#import "ANImageBitmapRep.h"
Then, scale the image like this:
pic.printingItem = [[UIImage imageWithContentsOfFile:path] imageFittingFrame:CGSizeMake(478, 640)];
You can change the CGSizeMake(x, y)
to whatever you want, in order to adjust the scale and resolution of the scaled image.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…