Batch fill PDF forms from python or bash

后端 未结 3 1277
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 03:37

I have a PDF form that needs to be filled out a bunch of times (it\'s a timesheet to be exact). Now since I don\'t want to do this by hand, I was looking for a way to fill t

3条回答
  •  悲&欢浪女
    2020-12-08 04:02

    Replace Original File

    os.system('pdftk "original.pdf" fill_form "data.fdf" output "output.pdf"')
    os.remove("data.fdf")
    os.remove("original.pdf")
    os.rename("output.pdf","original.pdf")
    

提交回复
热议问题