Questions tagged [php-pdftk]

27 questions
0
votes
0 answers

Choosing Specific PDF file based on Argument in PHP using PDFtk

I'm a new programmer, just so you're aware. $pdf = new Pdf("./Field Sheets Fill-In HOUSE v2.1.pdf"); $pdf->fillForm($data) ->saveAs('./completed/' . $filename); $checklistPdf = new Pdf("./Checklist - HOUSE.pdf"); …
0
votes
1 answer

Close PDF form after filling with pdftk php

I am using php-pdftk with laravel nova, filling a form after saving a resource. The problem is that the generated filled pdf is still editable. Is there any way to close that PDF after filling it? I've read that setting "flatten" property can do…
lopandpe
  • 491
  • 1
  • 5
  • 10
0
votes
1 answer

pdftk not executing in php

I can't execute pdftk in php. As in documentation, it is just mentioned as follow to saveas. use mikehaertl\pdftk\Pdf; $pdf = new Pdf('/path/my.pdf'); $pdf->allow('AllFeatures') // Change permissions ->compress($value) //…
Hemant
  • 83
  • 3
  • 9
0
votes
0 answers

Generate Simple PDF File From PHPword or PHPSpreadsheet?

I am tryinng to Create simple phpword file into pdf but haven't any idea how to approach i read many documentation and examples but all are bit confusable please help if possible - You can suggest any example in phpspreasheet also Code …
0
votes
0 answers

Adding current date to a signature image and adding it into an existing pdf

I have a signature image and want to add first the current date before it (on the left side) and then add this signature with date together to an existing pdf. The existing pdf is an application form with an area for the signature and date. What I…
Christian
  • 11
  • 2
0
votes
1 answer

sh: /usr/bin/pdftk: No such file or directory

I am trying to extract PDF form details using PDFTK sever but I am getting an error sh: /usr/bin/pdftk: No such file or directory when executing from PHP with help of exec and exec_shell both function. I tried with full path but still shows me the…
KSMS
  • 1
  • 2
0
votes
0 answers

Adobe editor PDF file form add a field to show image using PHP script

I want to add an image on PDF file form using PHP script. I have tried it by adding image field in PDF file and send image path using PHP script for that field, but it's not working. I am using php-pdftk library to edit PDF form field. But having…
0
votes
1 answer

pdftk - combining multiple pdf files with php

I am using php-pdftk and I am trying to make 1 pdf out of multiple pdfs. I have all my pdfs in an array however I couldn't figure out how to combine them into one. $pdfFiles = ['a.pdf', 'b.pdf', 'c.pdf'] $pdf = new Pdf($dir.…
senty
  • 12,385
  • 28
  • 130
  • 260
0
votes
1 answer

pdftk no output with php

I successfully installed pdftk on a VPS. It works fine when I run the commands in command line, but when I run the script on php it does not generate the pdf file. No errors anything. Has anyone had this same issue? When the script is run on php the…
joanb
  • 169
  • 1
  • 1
  • 17
0
votes
1 answer

Protecting a pdf with a password using pdftk-php

I have started using pdftk-php to populate form data into a pdf. Everything is working great. I would like to prompt the person viewing the newly created pdf (which is being viewed in the browser window) to add a password to protect the pdf prior…
Humphrey
  • 1
  • 2
-1
votes
1 answer

php-pdftk Mutlple Files

I am using php-pdftk to generate pdf files. I am attempting to create multiple pdf's, but this only generates 1 file. Here is an example of what I am doing. $pdf = new Pdf( 'file1.pdf' ); $pdf->send('test1.pdf'); $pdf2 = new Pdf( file2.pdf'…
Juan Rangel
  • 1,763
  • 1
  • 18
  • 34
-2
votes
1 answer

Wordpress theme php to pdf conversion error

I am using WordPress as my CMS.So there is a part where I am trying to generate a pdf file from php. I am using phpToPDF for generating the pdf file.I am doing so in a custom template page of wordpress and but getting this error: Warning: Cannot…
1
2