Fill pdf template

Hi I’ve got a quite complex PDF file and I need to fill some fields.
I’ve tried with the libray FPDM and I’ve managed to fill the form using the example I found on their gudelines.
The only problem is that if I try to print or save the file then the field values disappear.
I’ve dome some research online and I think I need to “flatten the pdf”? The only problem is I’m on a shared host and I can’t install PDFtk, does anybody know any other methods to achieve this? Many thanks