Saving Custom Forms to a PDF


(Acs5071) #1

Hi,

I’m trying to create a custom form using the XML FormGen and was wondering how to add an option to save a filled out form as a PDF. I know it’s possible because the Eye Exam form that is built in to OpenEMR has the option. I’ve tried looking through the XML code that generates the form, but I can’t pinpoint the code that actually creates the option.

Thank you for your help!


(Octavius Ceasar) #2

any chance you can use a PDF printer instead?


(Acs5071) #3

A PDF printer works; however, it saves the document to the computer instead of the patient’s documents. I was hoping to avoid the extra step of printing then uploading to the patient’s documents. The save to PDF option on the Eye Exam saves the PDF directly to the patient’s documents and I was hoping to recreate that to save our doctors and extra step.


(Brady Miller) #4

hi @acs5071 ,
Can see the coding magic that does that in the eye form here:
openemr/save.php at master · openemr/openemr · GitHub


(Acs5071) #5

Awesome, thank you! Is there something specific to put into the XML file that will cause the XMLFormGen to generate a save file like that one, or will I have to do it myself?


(Brady Miller) #6

hi @acs5071 , That will require analysis/coding to support it in xmlform gen code.