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

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

问题描述

我有很多JPG图像,应该将它们嵌入到生成的PDF中.它们具有很高的分辨率,每个分辨率约为5-10MB.我想将它们嵌入到PDF中作为预览,并且使用的是比例缩放XSL-FO属性.图像在PDF中正确调整了大小,但是生成的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格式化程序可以 下采样图像.

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

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

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