对缩小PDF文件有什么建议吗? [英] Any suggestions for shrinking a PDF file?

查看:104
本文介绍了对缩小PDF文件有什么建议吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个.net 2.0 Web系统,可以动态生成pdf文件.其中一些文件可能会变得很大-12MB以上.虽然处理时间并不是主要因素,但在某些情况下,要下载的文件的大小实际上是一定的.

We've got a .net 2.0 web system that dynamically builds pdf files. Some of these files can get pretty large - 12MB+. While processing time isn't a factor, really, the size of the files to be downloaded is in some cases.

目前,让我们假设我们的B级pdf库已经在制作它所知道的最小文件. (尽管,如果有人在这方面有任何建议,请参阅此相关问题.)

For the moment, let's assume that our B-grade pdf library is already making the smallest files that it knows how. (Although, if anyone has any suggestions on that front, do see this related question.)

但是,获取有问题的12MB文件并通过Acrobat蒸馏器发送,结果大约是700K文件,而打印质量没有明显损失.

However, taking the 12MB file in question and sending it though the Acrobat distiller results in a roughly 700K file, with no appreciable loss in print quality.

我很想拥有某种后处理程序,甚至可以完成其中的三分之一.有没有人知道他们会做类似这样的事情?

I'd love to have some kind of post-processor that does even a third of that. Does anyone have any controls they know about that'll do something like this?

对于这个项目,越便宜越好,但是我们并不反对付出几美元.

The cheaper the better, for this project, but we're not adverse to throwing a few bucks down.

(一些先发制人的评论:很自然,目前无法使用新工具重写现有的PDF生成代码.而且,尽管Distiller似乎有一个API,但在网络服务器上调用它似乎不是最有效的方法.高效的课程-Distiller有点贵.最后,我们最好也不要将pdf文件包装在zip文件或类似文件中,因为这可能会使客户感到困惑.不,真的.)

(Some preemptive comments: naturally, rewriting the existing PDF generation code with a new tool is off the table at the moment. Also, while Distiller seems to have an API, calling that on a webserver doesn't seem like the most efficient course - and Distiller is a little pricey. Finally, we'd just as well not wrap the pdfs in a zip file or some such, since that may baffle the clients somewhat. No, really.)

谢谢!

推荐答案

使用 Ghostscript ,该功能也可用于32位和64位Windows平台.它可以识别所有 Adob​​e Distiller 参数[1]和荣誉其中大多数.最重要的是,您可以将PostScript程序注入转换过程.我现在在预打印生产环境中使用大量图像的PDF上使用了一年.如果参数设置正确,则文件大小可以从40MB减小到800kB,而不会出现质量损失.我发现它运行起来非常快,实际上文档指出可能更快比Adobe Distiller .

Use Ghostscript, which is also available for the 32bit and 64bit Windows platforms. It recognises all Adobe Distiller parameters[1] and honors most of them. On top of that, you can inject PostScript programs into the conversion process. I use it for a year now in a pre-print production environment on image-heavy PDFs. If the parameters are set correct, the file-size can go from 40MB down to 800kB with no visible loss of quality. I found it to be quite fast, in fact the documentation states that it may be faster than Adobe Distiller.

它是免费的(啤酒和演讲中都是免费的).

And it is free (as in beer as well as in speech).

[1]参见 Distiller 的帮助文件夹中的 distparm.pdf 或查看

[1] See distparm.pdf in the help folder of Distiller or look here.

您从命令行中使用所有想要的参数,输入和输出文件来调用它,就完成了.

You call it from the command line with all your wanted parameters, input and output-files and you're done.

简单示例:

gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite\
   -dCompatibilityLevel=1.3 -dEncodeColorImages=true\
   -sOutputFile=output.pdf input.pdf

一些有价值的资源:

  • Ghostscript PDF writer tips
  • Postscript-to-PDF converter documentation

这篇关于对缩小PDF文件有什么建议吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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