0

I've developed a plug-in with specific (I'm mean non WordPress native) permission system, specific tables, specific tab system (each tab actually has a distinct form given that each has like hundreds of fields) ... everything is performed through JavaScript and WordPress API custom endpoints and, as far as I can see, would have hardly fit in all native WordPress forms.

My first idea for a .PDF export was to generate HTML and throw it into a JavaScript library which would transform that HTML into a .PDF file.

And I'm now requested to use a pre-existing .PDF file and this plug-in "Form Generating PDF - Wordpress plugin" https://codecanyon.net/item/form-generating-pdf-wordpress-plugin/20403948 to export the form to PDF . So it's not "generating PDF file" now, it's "injecting data into an existing PDF file".

Description says:

This plugin will send an PDF attachment filled with form user data, via email after his registration on a form, it's easy and manageable in simple three steps, it has the most unique features, that cannot be found on any existing plugin on the market.

(We don't need to send e-mail, just download the PDF, but the plug-in also says it does that.)

Now, the impression that have, reading about this plug-in, is that it expect some kind of WordPress "form submit" event to get triggered ... Is there a way the I could trigger this plug-in manually? Preferably a JavaScript way.

I've searched for documentation but I didn't find any code example. My search were submerged with commercial rather than technical information. I've also looked for ways to contact the editor/developer but their website looks dead. I'm looking for way to trigger this plug-in through JavaScript (if some people here know that specific plug-in), or for another plug-in that would do the task (inserting form fields inside of existing .PDF file at defined locations and the offering the PDF for download to the user). Or a JavaScript library (but on with a minimal coding to do to match the pre-existing PDF file and the form... like by


Some more research: I've read that I could use FPDI ( https://www.setasign.com/products/fpdi/about ) and FPDF ( http://www.fpdf.org/ ) to inject data into and existing PDF with PHP. Both are indeed user by the plug-in. Not sure if I better start something from scratch or retroengineer the plug-in to some extent and find some shortcut. Hints and solutions still welcome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.