D
D
Dmitry2019-12-03 20:56:09
PHP
Dmitry, 2019-12-03 20:56:09

How to fill fields in pdf using fpdf?

Tell me, I'm trying to use the fpdf library to fill in the fields in a PDF file according to this instruction .
When uploading a file, it writes an error:
FPDF-Merge Error: PDF file is empty!
The instructions say:

Note: if your template PDF is not compatible with this script, you can process it with PDFtk this way:
pdftk modele.pdf output modele2.pdf
Then try again with modele2.pdf.

I don't understand what it means to use PDFtk and what does it mean
pdftk modele.pdf output modele2.pdf

Tell me more, please?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
qfake, 2019-12-26
@qfake

https://github.com/mikehaertl/php-pdftk is a library.
But for converting to PDF, for example, html is better. Another plus is that any changes can be made on the go in html. If, in the end, it is PDF that is needed as a template, then it is easier to convert it to html, correct it and convert it back to PDF using the library you are going to work with. Such a pdf file will be read. mpdf has the same problem, it only reads what was created with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question