Apache-FOP - 减少嵌入到 PDF 中的图像大小 [英] Apache-FOP - reduce image sizes that are embedded into PDF

查看:28
本文介绍了Apache-FOP - 减少嵌入到 PDF 中的图像大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多 JPG 图像应该嵌入到生成的 PDF 中.它们具有相当大的分辨率,每个大约 5-10MB.我想将它们作为预览嵌入到 PDF 中,并且我正在使用适合比例的 XSL-FO 属性.图像在 PDF 中正确调整大小,但生成的 PDF 的大小相当大,基本上是所有图像大小的总和.我很好奇在生成 PDF 之前无需在单独的步骤中预处理图像而减小 PDF 大小的最佳方法(可能的方法)是什么?(这样 PDF 大小大约是所有图像大小的总和,如果它们与 PDF 中出现的一样小)

I have lots of JPG images that should be embedded into the resulting PDF. They have quite a big resolution and are about 5-10MB each. I want to embed them into PDF as a preview and I'm using a fit-to-scale XSL-FO attribute. Images appear in PDF correctly resized, but the size of the resulting PDF is quite big, basically the sum of all image sizes. I'm curious what is the best way (possible ways) to reduce PDF size without preprocessing images in a separate step before generating PDF? (so that the PDF size is about the sum of sizes of all images if they were as small as they appear in PDF)

非常感谢!

推荐答案

您有两个选择:

  1. 对 PDF 进行后处理.您可以在 Acrobat 中打开它并使用减小文件大小"选项.

  1. postprocess the PDF. You can open it in Acrobat and save it using the 'reduce file size' option.

使用另一个 FO 格式化程序.例如Antennahouse 格式化程序可以对图像进行下采样.<​​/p>

use another FO formatter. e.g. the Antennahouse formatter can downsample images.

这篇关于Apache-FOP - 减少嵌入到 PDF 中的图像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆