add a .pdf file(.png basically) to the end of every page in another .pdf file

北战南征 提交于 2019-12-04 12:00:30

A simple example of stamping an image (image.[pdf,png] onto a multipage pdf (text.pdf) allowing for manual tweaking of the scaling and offsets using pdfjam and pdftk could be:

# scale and offset the text part
pdfjam --scale 0.8 --frame True --offset '0cm 2.5cm' text.pdf
# scale and offset the image
pdfjam --paper 'a4paper' --scale 0.3 --offset '7cm -12cm' image.pdf
# combine both
pdftk text-pdfjam.pdf stamp image-pdfjam.pdf output combined.pdf

This might look like

If you start with an image file (png, jpg) you can convert it to pdf using imagemagick like

convert image.png image.pdf

Of course, the scale factors and offsets have to be adjusted to your needs. I included the --frame option to highlight the scaling of the text.pdf part. The stamp option overlays the image, whereas the background option would underlay the image.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!