Tried under OpenEMR 4.1.2(7) and 4.1.3-dev. Having problems getting html2pdf to run with PNG images. Started out not working for painmap form and found out it is any PNG image. Just creates invalid PDF according to Adobe Reader. Had to make changes to clickmap template to get html2pdf to process the HTML since it was missing a /P tag. Also changed painmap to use $webroot_server when running under html2pdf since it need real path of image not web path. I installed and used mpdf to replace html2pdf, with small change to custom_report.php everything seems to be working under mpdf. Does anybody want to see the code or should html2pdf just get fixed?
Hi James, have you read and fully understand library/html2pdf/README_OpenEMR.txt? It’s important (I think for patient reports) that some FPDI features can be used concurrently with html2pdf features. If mpdf can do all that, it may be the way to go… but in that case you should say more about what you did to get it working. Thanks,
I think I understand it Rod but not enough to see why PNG images don’t work yet. I will continue to look into it. Basically I did nothing but add the mpdf source to the library path. changed custom_report.php to require_once the mpdf.php file instead of the html2pdf.php file, changed $pdf = new mpdf$ then added Tony’s changes for PDF headers/footers by changing the <page_header> and <page_footer> tags to match what mpdf wanted and with header/footers passed as params of those tags. Nothing else was needed to work. I was surprised it worked out of the shoot with so little changes. mpdf says it was created by combining fpdf and html2fpdf.
James, that sounds very promising. You should test to make sure you can generate a PDF patient report that includes PDFs from their documents area as well as PDF output converted from HTML. If that works then you should create a commit that removes everything under library/html2pdf and adds mpdf, and a separate commit for your other changes… then we can check that over and hopefully others would also try testing it. I really like it that mpdf seems to be actively maintained.
Rod I just made a pull request from github of just the changes making html2pdf and clickmap to run. No mpdf stuff. Was that ok? then make one with the mpdf added? or should I do the git commands listed in ‘submit your code for review’ on wiki. if pull request was wrong please delete it
Rod I was able to get custom_report.php changed to import existing PDF documents using mpdf. mpdf appears almost like a direct replacement for all the various html2pdf peices but in one package. BTW I think I understand the git commands now and should be able to do the commits as documentated and requested.
I am not sure what happened, but it appears your pull request has been changed to merged (note it was not really merged and I am guessing a bug since openemr project does not really use that github pullfeature). Can you post a link to your github branch or commit here?