【发布时间】:2010-07-16 09:02:19
【问题描述】:
我正在开发一个电子书阅读器应用程序...我可以像 iBooks 应用程序一样工作。 我用过:
CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("paper.pdf"), NULL, NULL);
pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL);
CFRelease(pdfURL);
- (void) renderPageAtIndexNSUInteger)index inContextCGContextRef)ctx
{
CGPDFPageRef page = CGPDFDocumentGetPage(pdf, index + 1);
CGAffineTransform transform = aspectFit(CGPDFPageGetBoxRect(page, kCGPDFMediaBox), CGContextGetClipBoundingBox(ctx));
CGContextConcatCTM(ctx, transform);
CGContextDrawPDFPage(ctx, page);
}
但问题是如何调整字体或文本颜色?我找不到任何可以更改属性的方法或委托。
请指教。
【问题讨论】:
标签: iphone iphone-sdk-3.2 ibooks cgpdfcontext