Retina ディスプレイをサポートする iOS で高解像度の PDF を生成する方法はありますか? 基本的な PDF ジェネレーターを作成しましたが、iPad 3 ではまだピクセル化されたように見えます。いろいろアドバイスありがとうございます!
アップデート:
私のPDFファイルのテキストは滑らかで美しいです。しかし、コードを使用してこのpdfを描画すると、網膜ディスプレイでピクセル化されました(描画コードは下部にあります)。
PDF 生成:
    NSString *fileName = [self.bookManager cacheBookFileForPage:i];
    UIGraphicsBeginPDFContextToFile(fileName, CGRectZero, nil);
    CGContextRef currentContext = UIGraphicsGetCurrentContext();
    CGContextSetTextMatrix(currentContext, CGAffineTransformIdentity);
    CGContextTranslateCTM(currentContext, 0, 100);
    CGContextScaleCTM(currentContext, 1.0, -1.0);
    // TODO: Temporary numbers
    UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 768 * 2, 1024 * 2), nil);
    NSString *textToDraw = @"text";
    CFStringRef stringRef = (__bridge CFStringRef)textToDraw;
    CTFontRef ctFont= CTFontCreateWithName(CFSTR("Arial"), 20 * 2, &CGAffineTransformIdentity);
    NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
                                (__bridge id)ctFont, (NSString *)kCTFontAttributeName,
                                nil];
    NSAttributedString *string = [[NSAttributedString alloc] initWithString:textToDraw
                                                                 attributes:attributes];
    CFRelease(ctFont);
    CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((__bridge CFAttributedStringRef)string);
    // TODO: temporary        
    CGRect frameRect = CGRectMake(100, 100, 800 * 2, 50 * 2);
    CGMutablePathRef framePath = CGPathCreateMutable();
    CGPathAddRect(framePath, NULL, frameRect);
    // Get the frame that will do the rendering.
    CFRange currentRange = CFRangeMake(0, 0);
    CTFrameRef frameRef = CTFramesetterCreateFrame(framesetter, currentRange, framePath, NULL);
    CGPathRelease(framePath);
    // Draw the frame.
    CTFrameDraw(frameRef, currentContext);
    CFRelease(frameRef);
    CFRelease(stringRef);
    CFRelease(framesetter);
    // Close the PDF context and write the contents out.
    UIGraphicsEndPDFContext();
PDF 図面:
// This will return pageRef from PDF
CGPDFPageRef page = [self.bookManager contentForPage:index + 1];
CGContextSetRGBFillColor(context, 1.0f, 1.0f, 1.0f, 1.0f);
CGContextFillRect(context, CGContextGetClipBoundingBox(context));
CGContextTranslateCTM(context, 0.0f, [self.view.layer bounds].size.height);
CGRect transformRect = CGRectMake(0, 0, [self.view.layer bounds].size.width, [self.view.layer bounds].size.height);
CGAffineTransform pdfTransform = CGPDFPageGetDrawingTransform(page, kCGPDFCropBox, transformRect, 0, true);
// And apply the transform.
CGContextConcatCTM(context, pdfTransform);
CGContextScaleCTM(context, 1.0f, -1.0f);
CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
CGContextSetRenderingIntent(context, kCGRenderingIntentDefault);
CGContextDrawPDFPage(context, page);