Well…after much effort I have ultimately failed in this project. I haven’t been able to get Fax Dispatch to work optimally. The trouble lies in the convert process. Whether you use Imagemagick (convert) or GraphicsMagick (gm convert), and no matter what arguments you use to change how a pdf file is converted to tiff, the faxes don’t come out right on the receiving end. The conversion tiff file itself looks fine, but something about interfacing with Hylafax makes it too tiny on the receiving end. If I try to resize it up, the output becomes nearly unreadable.
Hylafax is passable with the pdf (with some modifications in the Ghostscript dithering process) if I use sendfax to send the fax directly without conversion. And I still wish to deal in pdfs because they can be previewed when scanned into patient documents, written on with other software, and ultimately handled in the digital domain without dropping down to paper. So the solution I’ve settled on for my work flow is to take a received document (say, a prescription refill request), open it with GIMP, annotate it however I need to, export it with GIMP to a pdf, sendfax it directly from the command line using a kindergarten-level script that I wrote (faxcover or no, re:, comments, etc.), and save it to patient Documents. I can do all this fairly efficiently, and I can still watch its status going out from within OpenEMR. The fidelity of the received fax would be much better if I could export the modified file in GIMP to tiff, but GIMP unfortunately doesn’t allow for export to multi-page tiffs. So that’s that.
The ideal would be to take a received fax, annotate it from within OpenEMR, and then resend it through Fax Dispatch with good fidelity on the receiving end. That’s just not possible as it currently stands.
I was able to fix fax_view.php. You just have to get rid of tiff2pdf; it’s too buggy, for reasons mentioned before. Just change this line:
to this:
passthru(“gm convert ‘$ffname’ PDF:-”);
(I’m using GraphicsMagick which is supposed to be more efficient than ImageMagick; if you stick with ImageMagick then the command would just be convert instead of gm convert.)
This change will allow you to open and view faxes/scanned files with the hyperlinks in the Fax/Scan module.
Happy faxing,
Venu