- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试从 PDF 文件创建缩略图。我能够从下面的命令生成 JPEG 图像,但问题是我无法将输出图像的大小调整为固定大小( 250x250 )
命令 -dPDFFitPage=true 使输出图像适合给定的尺寸,并且图像显示为旋转。谁能帮我解决这个问题,为 250x250 大小的 PDF 文件生成缩略图。
/usr/bin/gs -dNOPAUSE -sDEVICE=jpeg -dFirstPage=1 -dLastPage=1 -sOutputFile=<path to output file>%d.jpeg -dJPEGQ=100 -g250x250 -dUseCropBox=true -dPDFFitPage=true -q <path to input file>.pdf -c quit
**** Error reading a content stream. The page may be incomplete.
**** File did not complete the page properly and may be damaged.
Error: /ioerror in --showpage--
Operand stack:
1 true
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1945 1 3 %oparray_pop 1944 1 3 %oparray_pop 1928 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- 1826 0 11 %oparray_pop --nostringval-- --nostringval--
Dictionary stack:
--dict:1187/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)-- --dict:82/200(L)-- --dict:116/127(ro)(G)-- --dict:280/300(ro)(G)-- --dict:30/32(L)-- --dict:6/8(L)-- --dict:21/40(L)-- --dict:1/1(ro)(G)-- --dict:7/17(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.15: Unrecoverable error, exit code 1
Unrecoverable error: typecheck in setpagedevice
最佳答案
下面的代码对我有用:
gs -sDEVICE=jpeg -dPDFFitPage=true -dDEVICEWIDTHPOINTS=250 -dDEVICEHEIGHTPOINTS=250 -sOutputFile=outputfile.jpeg inputfile.pdf
-dDEVICEWIDTHPOINTS=pixels
-dDEVICEHEIGHTPOINTS=pixels
关于pdf - GhostScript 命令从 PDF 文件创建缩略图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26383405/
我正在使用 Ghostscript 将多页 PDF 转换为单个 JPEG 文件,并且可以让它输出编号为 page_%03d.jpg 的文件。 但它总是从 page_001.jpg 开始,我需要它从 p
我在windows下的ghostscript中找不到清屏命令。请你帮助我好吗? 谢谢。 最佳答案 所以你想清除文本窗口?怎么样: 28 { ()= } repeat % output 28 bl
如何使用 ghostscript 创建空白页面?我想在将多个 PDF 合并在一起时执行此操作 - 类似于: `gs -dNOPAUSE -o /path/to/output input1.pdf i
我从 Ghostscript 调用中收到此错误消息: Error: /syntaxerror in -file- Operand stack: Execution stack: %interp_
我正在使用 Ghostscript 通过命令行参数打印 PDF。但它在打印机后台处理程序中将打印文档的名称显示为 Ghostscript 输出。我想将其更改为自定义名称(作为字母名称)。 最佳答案 请
我正在使用 Ghostscript 将可搜索的 PDF 转换为图像 PDF,以便使用成像工具包使用命令行查看它们: gswin32 -o c:\temp\output%d.png -r300 -dTe
我已经有大约 20 年没有手工编写 Postscript 代码了,所以我打开了 Bluebook 并将一些示例输入到名为 test.ps 的文件中。这是一个这样的例子: %!PS /doACircle
我知道他的问题到目前为止已经被问过很多次但是没有解决方案能够为能够使用所有者和用户密码保护 pdf 的 ghostscript 提供正确的语法和参数,也使用了加密,我已经使用以下命令但似乎没有人工作:
我知道他的问题到目前为止已经被问过很多次但是没有解决方案能够为能够使用所有者和用户密码保护 pdf 的 ghostscript 提供正确的语法和参数,也使用了加密,我已经使用以下命令但似乎没有人工作:
我应该传递哪些参数?我使用的 Ghostscript 版本是 8.71。 最佳答案 gs \ -dNOSAFER \ -sDEVICE=pdfwrite \ -o foo.pdf \ /us
我是 ghostscript 的新手,我无法理解语法。每当我尝试最简单的命令时,例如 -h 或 -?我收到一个错误,我尝试了各种组合。 GPL Ghostscript 9.05 (2012-0
我的桌面上有一个文件 abc.ps。我已经在我的机器上安装了 Ghostscript 9.05,我想使用命令行查看我的 abc.ps 文件。 GS>????? 我应该在这里写什么命令。我正在使用 Wi
将 CMYK eps 转换为 jpeg 时,Ghostscript 将颜色空间更改为 RGB。问题是在转换过程中保持颜色空间不变。提前谢谢。 最佳答案 假设您要将 EPS 中的任何 RGB 转换为 C
我正在 Linux 服务器中为我的应用程序运行 PostScript 到 PDF 转换服务。我安装了 Ghostscript 版本 8.70。我在 Windows 中使用 gsdll64.dll 、
是否可以使用ghostscript检查pdf是否受密码保护? 命令是什么? 我知道你可以使用 ghostscript 去除 pdf 密码, 但我想做的只是检查 PDF 是否受密码保护或启用安全性。 最
例子: 从 Excel 创建一张单页横向 PDF。使用 Adobe Reader 打开它,它以横向方式打开。使用 Ghostscript 打印它。使用 Adobe Reader 打开打印输出,
我正在尝试将彩色 pdf 转换为纯黑白 tiff,即如果颜色不是白色,我希望它是纯黑色。目前我的颜色线条变得有 Blob 和模糊,我认为这是由于半色调。有没有办法覆盖这个半色调?下面的例子。 电流输出
我有一个从 pdflatex 创建的文档,嵌入了 R pdf 图。我现在正试图将它发送给要求嵌入所有字体的打印机 (lulu)。我想,没问题, # gs -dNOPAUSE -dBATCH -dNOP
我使用这个 Ghostscript 命令将 PDF 转换为图像: gs \ -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT \ -d
我有一个ghostscript命令,可将pdf转换为几个PNG图像(每页一个)。命令参数如下: -dNOPAUSE -q -r300 -sPAPERSIZE=a4 -dTextAlphaBits=4
我是一名优秀的程序员,十分优秀!