【问题标题】:Problem with ebook reader application电子书阅读器应用程序的问题
【发布时间】: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


    【解决方案1】:

    您正在加载 PDF 文件。如果不从文件中手动提取文本并重新生成 PDF 或执行您自己的自定义文档绘图,则无法调整该文档中的文本。请注意,iBooks 不允许您更改 PDF 中的字体或文本颜色,只能放大和缩小文档。

    【讨论】:

      猜你喜欢
      • 2019-01-10
      • 1970-01-01
      • 1970-01-01
      • 2014-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-02
      • 1970-01-01
      相关资源
      最近更新 更多