Objective-c PDF 渲染
如何减小使用 [v.layer renderInContext:pdfContext];
渲染的 PDF 的大小 现在,我正在渲染一个 10 页的 PDF,其中包含 20 张图像(每页 2 张),大小为 2.7mb。如何将其减少到 2 MB 以下?
谢谢!
How can i reduce the size of PDF being rendered using [v.layer renderInContext:pdfContext];
Right now, I am rendering a 10 pages PDF with 20 images(2 of each page) and the size is 2.7mb. How can I reduce it to less than 2 mb?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据RR的评论,您可以在转换为PDF之前尝试降低每个图像的质量。像这样:
lowResImage = [UIImage imageWithData:UIImageJPEGRepresentation(highResImage,quality)];
使品质< 1.0等
from RR's comment, you can try to reduce a little quality of each image before doing the conversion to PDF. Like this:
lowResImage = [UIImage imageWithData:UIImageJPEGRepresentation(highResImage, quality)];
Make quality < 1.0 etc.