pdf - 转换 pbm -> tiff -> tiffcp -> tiff2pdf 。获取 5mm 页面

标签 pdf imagemagick tiff multipage

我通常扫描多页文件,而且我使用的是一种简单的方法。

for f in ???\.pbm; do 
   convert -compress Group4 $f ${f%pbm}tiff; 
done;

tiffcp *\.tiff o.tiff; 

tiff2pdf o.tiff -o o.pdf

但是这样我可以获得很好的 TIFF 和非常糟糕的 PDF。

以下是identify的输出:
(每页类似)

Image: o.tiff
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 1248x1649+0+0
Resolution: 72x72
Print size: 17.3333x22.9028

Image: o.pdf
Format: PDF (Portable Document Format)
Class: DirectClass
Geometry: 17x23+0+0
Resolution: 72x72
Print size: 0.236111x0.319444

我尝试在所有步骤上使用密度设置,但没有任何帮助。有人知道错误在哪里吗?

最佳答案

tiff2pdf步骤中,尝试使用此命令:

 tiff2pdf  -p A4  -F  -o o.pdf  o.tiff
  • -p A4:强制 PDF 使用 ISO A4 页面尺寸(您也可以使用 letterlegal)。
  • -F:强制 TIFF 完全填满页面。

关于pdf - 转换 pbm -> tiff -> tiffcp -> tiff2pdf 。获取 5mm 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9856262/

相关文章:

javascript - 缺少图像取决于 html2canvas (html2pdf) 中的比例

javascript - 重定向到 PDF 下载的新页面

r - 将图像或pdf插入R中的word文档

node.js - 在命令行上使用 ImageMagick 将 PDF 转换为图像

pdf - 自动计算字段不适用于 iText

javascript - 如何使 PDF 中的图像在新的弹出窗口中打开其链接?

pdf - Windows 等价于 Unix 的 pdfinfo

python - GeoTIFF 元数据文件中的纬度/经度(公里)与计算的距离不匹配

Python PIL 难以处理未压缩的 16 位 TIFF 图像

java - 使用itext在java中将Tiff转换为Pdf