Creating a pdf version of a complicated form, populated with data from a database

Philip Taylor Philip.Taylor at Hellenic-Institute.Uk
Fri Apr 5 13:16:48 CEST 2024


Christopher W. Ryan via texhax wrote:
> I dream of using R, Rmarkdown, knittr, and pdflatex to pull individual
> records from a database and generate a form like page 1 here:
>
> https://www.cigna.com/static/www-cigna-com/docs/form-cms1500.pdf
>
> one pdf form per database record, with the form fields populated. Then I
> could print them, and mail the bills to patients' insurers.
If you are planning to print them, rather than submit them 
electronically, then might you not do better to start with the /static/ 
version of the form ?  You would not then have to worry about getting 
the mauve coloured background to the various interactive fields, nor 
would these fields have to be active as they are in the version to which 
you link.  A static version of the form can be seen at 
https://www.nucc.org/images/stories/PDF/1500_claim_form_2012_02.pdf, and 
I attach a copy of the same with the "SAMPLE" overlay removed. As regard 
achieving the layout, as a Plain (Xe)TeX user I would simply code it as 
a series of nested \haligns. 
\\TeX\Live\2024\texmf-dist\tex\generic\olsak-misc\qrcode.tex would allow 
you to generate the requisite QR code, and the rotated text could be 
accomplished with a few PDF \specials (see TeX attachment).  And to 
extract the data from the database, I would export it to an Excel 
spreadsheet from which it could be trivially extracted with optional 
markup embedded.
-- 
/Philip Taylor/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20240405/8be26159/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1500_claim_form_2012_02-1.pdf
Type: application/pdf
Size: 3709722 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20240405/8be26159/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NUCC.pdf
Type: application/pdf
Size: 38233 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20240405/8be26159/attachment-0003.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NUCC.tex
Type: text/x-tex
Size: 899 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20240405/8be26159/attachment-0001.bin>


More information about the texhax mailing list.