Tile/concatenate 使用 imagemagick 的高分辨率 PDF 文件

Tile/concatenate high resolution PDF files with imagemagick

我有 9 个高质量的 PDF 文件。我想将它们合并成一个 3x3 的大 PDF。然后我想把它变成一个 PNG 文件。我想在此过程中保留 resolution/sharpness,以便在生成的 PNG 上我可以直接放大并仍然看到细节。我以为我可以用 imagemagick 做到这一点,但我很挣扎。有什么想法吗?

我试过将它们合并在一起作为开始。它有效,但质量并没有保持。

montage input_*.pdf -background none -tile 3x3 -geometry +0+0 output.pdf

请注意,文件大小和生成图像的大小不是问题。我不需要打印它或类似的东西。仅供在电脑上观看。

以下是三个 PDF 文件的示例:

1) https://www.dropbox.com/s/qc094jg1nkfk0jw/input_1.pdf?dl=0

2) https://www.dropbox.com/s/gb4u8r7bxg8lw2r/input_2.pdf?dl=0

3) https://www.dropbox.com/s/97dhi42wrvfxfd2/input_3.pdf?dl=0

每个 PDF 为 1071 x 1800 pts(使用 pdfinfo)。

谢谢

詹姆斯

与其坚持使用 PDF 然后合并再转换为 PNG,不如首先将图像提取为 PNG,然后像这样连接 PNG 文件:

pdfimages -png input_1.pdf a
pdfimages -png input_2.pdf a
pdfimages -png input_3.pdf a

# Combine them side by side
montage a-*png -background none -tile 3x3 -geometry +0+0 output.png

# Or combine with "convert"
convert a-*.png +append result.png

第二个文件好像有遮罩...

pdfimages -list input_1.pdf
page   num  type   width height color comp bpc  enc interp  object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
   1     0 image   12000 20167  icc     3   8  image  no         9  0   807   807 1260K 0.2%

pdfimages -list input_2.pdf
page   num  type   width height color comp bpc  enc interp  object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
   1     0 image   12000 20167  icc     3   8  image  no         9  0   807   807 5781K 0.8%
   1     1 smask   12000 20167  gray    1   8  image  no         9  0   807   807  230K 0.1%

pdfimages -list input_3.pdf
page   num  type   width height color comp bpc  enc interp  object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
   1     0 image   12001 20167  icc     3   8  image  no         9  0   807   807 2619K 0.4%