deschel wrote on Saturday, June 28, 2014:
I am almost finished with my project to allow communication with a remote hylafax faxserver over the internet using curl. I finished all of the code to list faxes and display individual faxes (in faxq.php and fax_view.php) and created a new webpage to put on the remote server (curl_response.php). My last step is to work on faxdispatch.php, which sends the fax document to the patient selected by the user.
When trying to use faxdispatch, I discovered a major bug that should be fixable with a change to one line of code – using “convert” instead of “tiff2pdf”. This bug is outlined at the thread at: https://sourceforge.net/p/openemr/discussion/202505/thread/502c8806/?limit=100.
I was a bit surprised to see that pdf’s are not handled directly with faxdispatch – they are converted to tiffs for “handling” then converted back to pdfs to dispatch to the documents folder.
This does not make sense to me. Also, it can result in image degradation. This is most noticeable for documents that are true pdf’s (which have text that is vectorized postscript, rather than rasterized).
My next project will be to modify faxdispatch to handle pdf’s directly, without converting them to bitmapped tiff files.
My question is:
What libraries are currently used by OpenEMR to handle pdf’s?
The library actions/functions that I would like to use are:
(1) Splitting a multipage pdf to single page pdf’s (without rasterizing them).
(2) Rotating single page pdf’s.
(3) Adding text or images (like scanned signatures) to a pdf page without having to rasterize the pdf first (i.e. adding the text/image as a pdf layer.)
The problem with using ghostscript/imagemagick is that it rasterizes the pdf.
There is a library/command line application called pdftk which is opensource and provides the functions that I would like to use. However, using this would create a new dependency.
So, I would like advice on how to proceed.
Does anyone have any suggestions about what libraries/commandline applications to use?
Or, any suggestions about how to do what I want to do without adding another dependency?
David Eschelbacher MD
I was