Search code examples
phppdf-generationpdftk

PDFTK want to transfer to another domain


I am working on a project which was developed by another developer Now client wants me to move it from current linux based server to new windows based server

it is developed in cakephp and PDFTK is used to fill pdf files dynamically.

I am trying to configure it first on my PC locally, to learn configuration of PDFTK

I have downloaded PDFTK Free version and installed

it generates pdfile with zero bytes size and it is not opeining

I also tried to try in in CMD

pdftk D:\wamp\www\my-project\app\webroot/files/138.pdf fill_form D:\wamp\www\my-project\app\webroot/files/results/1401.fdf output generated_pdfs/test_24.pdf

it returns the following error

 Error: Failed to open output file:
   generated_pdfs/test_24.pdf
   No output created.
 Error: unable to open file for output: generated_pdfs/test_24.pdf

while the target folder has permission to write on it


Solution

  • pdftk TEMPLATE_FILE fill_form DATA_FILE output OUTPUT_FILE
    

    try using OUTPUT_FILE with fullpath as below

    OUTPUT_FILE = D:/folder/.../generated_pdfs/test_24.pdf