How to pass variables as stdin into command line from PHP

后端 未结 2 1667
故里飘歌
故里飘歌 2020-11-29 04:00

I am trying to write a PHP script that uses the pdftk app to merge an XFDF with a PDF form and output the merged PDF to the user. According to the pdftk documentation, I can

2条回答
  •  迷失自我
    2020-11-29 04:25

    1) Why are you outputting to standard out and then putting that stuff into a file? Why not just have pdftk dump to the file, i.e.

    exec("pdftk blankform.pdf fill_form formdata.xfdf output filledform.pdf");
    

    2) Use proc_open(). Feel free to post any problems you have with the function.

提交回复
热议问题