开发者

Generating PDF: low resolution (How to make it higher res?)

I am generating a PDF in the following manner (code snippet):

UIView *displayView = self.view;
//displayView.contentScaleFactor = 3.0;
CGRect pageRect = displayView.bounds;
if (UIGraphicsBeginPDFContextToFile(path, pageRect, [self pdfContextDictionary]) == NO) {
  return nil; // error
}

UIGraphicsBeginPDFPage();
CGContextRef context = UIGraphicsGetCurrentContext();
CALayer *layer = displayView.layer;
//layer.contentsScale = 3.0;
[layer renderInContext:context];
UIGraphicsEndPDFContext();  

both of the commented out lines were two differen开发者_高级运维t attempts to get the view to render at a higher resolution. i've seen others comment about making the view much larger, which will be my next step unless anyone knows any magic incantation to force the renderInContext: to generate a higher res output.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜