是否可以使用GhostScript获取页面大小(例如PDF文档页面)?我见过"bbox"设备,但是它返回了边界框(每页不同),而不是PDF页面的TrimBox(或CropBox).(有关页面框的信息,请参阅http://www.prepressure.com/pdf/basics/page_boxes.)还有其他可能吗?
我正在寻找一种方法来"概述" PDF文件中的所有文本/字体,即将它们转换为曲线.
我更愿意这样做而无需将PDF转换为PostScript并返回.此外,我想使用可以从命令行自动执行的免费轻量级跨平台工具,例如Ghostscript或MuPDF.
我从Ghostscript调用中收到此错误消息:
Error: /syntaxerror in -file-
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
--nostringval-- --nostringval-- false 1 %stopped_push 1926 1 3 %oparray_pop 1925 1 3 %oparray_
pop 1909 1 3 %oparray_pop 1803 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostr
ingval-- --nostringval-- --nostringval-- 2 %stopped_push
Dictionary stack:
--dict:1169/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Current file position is 215
GPL Ghostscript 9.05: Unrecoverable error, exit code 1
Run Code Online (Sandbox Code Playgroud)
这是否意味着输入Postscript文件中存在问题,或者它是否意味着我的通话或安装有问题?
电话是:
ps2pdf book.ps book.pdf
Run Code Online (Sandbox Code Playgroud)
输入文件book.ps存在于当前目录中.
是否有Ghostscript错误消息列表以及它们在某处意味着什么?(在这种情况下,谷歌不是我的朋友.)
我一直在反对这一点,但无济于事.
我需要缩小一些大型PDF以在8.5x11英寸(标准字母)页面上打印.ImageMagick/Ghostscript可以处理这类事情,还是因为我使用错误的工具来解决这个问题?
仅仅依靠客户端打印对话框中的"缩小到页面"选项不是一种选择,因为我们希望这对最终用户来说易于使用.
我的小组一直在使用itext-sharp库和C#/ .NET来生成自定义的动态PDF.在大多数情况下,这个过程非常适合我们的需求.我们在开发/测试期间可能遇到的一个问题是布局问题,这可能导致PDF无法在Adobe Reader中正确打开/呈现,尤其是.较新版本的Acrobat/Reader.
该文档将正确打开前X页的显示.但是如果出现错误,则不会显示文档中的其余页面.
如上所述,我们通常能够使用C#/ iText代码将此问题跟踪到布局类型问题.我们最终通过使用猜测和检查方法或分而治之来找到错误.它有效,但它不是解决这些问题的最佳方法.
我想知道是否有任何可用的工具可以加快验证PDF文档的过程,并有助于指出文档中的错误?
我一直在编写软件来解析PDF中的内容,特别是分成区域的文本.为此,我需要字体指标,如字形位移,字体范围上升,下降和字形边界框等.简而言之,PDF格式定义的FontDescriptor字典中应该可用的指标类型.
不幸的是,对于基本字体是"基本14"标准字体集之一的字体,不必包含FontDescriptor.
我在哪里可以找到或如何为base 14字体生成字体指标?
正如标题所说我试图将png转换为pdf.我无法在任何地方找到关于此的详细描述.
我用过这个命令
gs sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=test.pdf test.png
Run Code Online (Sandbox Code Playgroud)
但我得到的只是
Error: /syntaxerror in (binary token, type=137)
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1894 1 3 %oparray_pop 1893 1 3 %oparray_pop 1877 1 3 %oparray_pop 1771 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
GPL Ghostscript 9.07: Unrecoverable error, exit code 1
Run Code Online (Sandbox Code Playgroud)
此错误消息.现在我开始讨论如果ghostscript中有这样的功能.我应该使用其他软件吗?**我正在运行最新的9.07版本
我正在尝试将PDF文件转换为PNG.它在命令行中运行良好(我安装了GhostScript 8.64).但是从PHP我遇到了一个问题:
码:
$im = new Imagick($pdf_file); // this is where it throws the exception below
Run Code Online (Sandbox Code Playgroud)
输出:
Fatal error: Uncaught exception ‘ImagickException’ with message ‘Postscript delegate failed `23_1235606503.pdf’: No such file or directory @ pdf.c/ReadPDFImage/612? in get_thumbnail.php:93
Stack trace:
\#0 get_thumbnail.php(93): Imagick->__construct(’…’)
Run Code Online (Sandbox Code Playgroud)
等等
我不确定我在这里做错了什么,但我怀疑它与某处的服务器配置有关.我正在运行:Apache 2.2.11 PHP 5.2.8 ImageMagick 6.4.8-9 GhostScript 8.64
我正在开发一个UNIX系统,我想将数千个PDF文件合并到一个文件中以便打印它.我不知道他们提前有多少页.
我想双面打印,这样两个文件就不会在同一页面上.
因此,我将合并文件对齐,使得每个文件将以奇数页开始,如果下一个要写的页是偶数页,则将添加空白页.
我需要渲染或获取特定PDF文件中的所有图像.如何使用Ghostscript或ImageMagick实现此目的?
ghostscript ×10
pdf ×8
fonts ×2
imagemagick ×2
image ×1
itextsharp ×1
java ×1
mupdf ×1
php ×1
postscript ×1
resize ×1
size ×1
unix ×1