How can I change text size of PDF CMS-1500?

mcsystemsgb wrote on Thursday, August 04, 2011:

We are a small firm so there may be some Insurance Companies with whom we will still send paper forms to. Rather than order form stock I want to laser print the filled in forms. I used PDFill http://www.pdfill.com to convert the PDF form to a .png image, made it transparent and set the resultant image to be the watermark.
Now I can replace the pages with each new batch and print the completed forms. I haven’t tried submitting them yet.  But, I set pdf file to 600 dpi and I converted the image file at 600 dpi, the form looks great. It looks great printed on my OfficeJet and awesome, though the red looks a little “redder”,  from the color laser printer.
I removed the “Signature on File” text from boxx 31 as a Signature Stamp is needed there, for our payers. I’m probably going to embed a scan of that stamp in the form.
Now I wish I could reduce the font size in the OpenEMR generated PDF to better fit the form in boxes 32 and 33. The Service Facility and Billing provider info is truncated and I wish I could specify 9 point type there.
It would be even better if those two boxes would be auto sized.

mike-h30 wrote on Thursday, August 04, 2011:

I didn’t find a straight forward method for adjusting font for the PDF generation of the HCFA 1500.  Given the minimal amount of paper claims we need to submit these days I performed a temporary fix until paper claims become obsolete for us.   What I did was modify the following two files:

/library/gen_hcfa_1500.inc.php
/library/billing_process.php

1.  I commented out lines of code that had anything to do with boxes 32 and 33 in the file /library/gen_hcfa_1500.inc.php

2. The PDF text for the HCFA 1500 is generated at the line below  (around 210) in the file /library/billing_process.php.

$pdf->ezText($tmplines, 12, array('justification' => 'left', 'leading' => 12));

After the above line, I hard coded our facility info with font adjusted to size 8 for boxes 32 and 33 using the EZPDF class function “addText().”

   

	   $pdf->addText(430,82,8,'555-555-5555');
	    $pdf->addText(378,72,8,'Your Facility Name');
	    $pdf->addText(378,62,8,'Your Facility Address');
	    $pdf->addText(378,52,8,'City, State Zip Code');

You will have to play around with the parameters of the EZ-PDF function addText() to achieve your desired output.  Here is a reference to the EZ-PDF class functions.

http://www.ros.co.nz/pdf/readme.pdf

Hope that helps.

Mike

mcsystemsgb wrote on Thursday, August 04, 2011:

Here’s what I have so far. Work pretty good.

$pdf->ezText($tmplines, 12, array(‘justification’ => ‘left’, ‘leading’ => 12));

    $pdf->addText(385,78,8,‘Facility Name’);
    $pdf->addText(385,68,8,‘Facility Address’);
    $pdf->addText(385,58,8,‘City, ST, Zip+4’);
$pdf->addText(190,78,8,‘Billing Provider’);
    $pdf->addText(190,68,8,‘Billing Provider Address’);
    $pdf->addText(190,58,8,‘City, ST,  Zip+4’);
Thanks
I was thinking about getting the form to print at this stage. But I worry that in order to get a decent printout of an image based form, the file size might create an annoying lag in PDF File creation. A native PDF form would be great here.

mike-h30 wrote on Friday, August 05, 2011:

I am glad that worked for you.

The EZPDF class allows an image (i.e. jpeg) to be used as a background when creating the PDF. I have taken native PDF forms and converted them to jpeg to use as a background for printing our custom forms to PDF via notegen.php.  I tried that process with the HCFA 1500.  I scanned a HCFA 1500 and converted to jpeg for use as EZPDF background.   The only problem is it works for printing one claim at a time.  If I print a batch of claims, the HCFA 1500 jpeg only prints on the very first claim leaving the others with the white background.   Considering we have very few paper claims, I’ll just bite the bullet and deal with the extra busy work until paper claims become obsolete ( I hope very soon!).

Mike

mdsupport wrote on Friday, August 05, 2011:

Probably 1 line of imagemagick command to do all your requirements.  Look at fax / scan / prescription process to split / merge / superimpose /watermark various types of files. 

mike-h30 wrote on Sunday, August 07, 2011:

Probably 1 line of imagemagick command to do all your requirements.  Look at fax / scan / prescription process to split / merge / superimpose /watermark various types of files. 

Thanks for the suggestion.  I never thought to utilize Imagemagick.   I’ll give it a try.