Add cut/crop marks to pdf with imagemagick

时间:2016-03-10 16:24:31

标签: linux macos pdf imagemagick crop

I have a pdf file which is getting generated with Inkscape from SVG and processed with ImageMagick.

Now the PDF is a perfect DINA4 @300 DPI

How can I add some marks around it?

My marks should look like this: http://cl.ly/033g3t2h0U0f/A4_crop.png

我需要将它放在pdf上,重叠3毫米才能正确剪切。不知何故喜欢这个结果:http://cl.ly/300F0A402r1D(我不知道这个结果是3mm,只是一个例子)

1 个答案:

答案 0 :(得分:0)

ImageMagick很容易做到这一点。

composite -gravity center -density 300 src/in.pdf src/overlay.png out.pdf

就是这样。请注意ghostscript是必需的,否则您将收到此错误:

composite: no images defined `out.pdf' @ error/convert.c/ConvertImageCommand/3252.

我之前使用identify添加了一些检查来证明分辨率和大小正确,否则我convert文件格式正确。

相关问题