sunsetsystems wrote on Wednesday, October 03, 2012:
A client gave me the task of generating the patient report as a single PDF. This is very desirable to speed things up (avoiding conversion of PDF documents to JPEG), to create output that can be stored as a file onto removable medium, and for clean printing of the output.
The big challenges here are merging in the patient’s PDF documents, and converting HTML to PDF format (HTML is generated by all encounter form reports as well as demographics and history). After quite a bit of searching I found some open source PHP classes that can do this:
1. TCPDF, a class for working with PDFs. LGPL license.
2. HTML2PDF, a class that extends TCPDF and which does what its name suggests. Also LGPL.
3. FPDI, another class that extends TCPDF and can merge PDF files into the PDF that you are building. Apache 2 License.
These classes should be very handy for working with PDFs in other parts of OpenEMR, and they are a life-saving solution for the problem described above. Any objections to including them in OpenEMR distributions? It would be difficult for a user to install them otherwise.