<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Christopher W. Ryan via texhax wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2281d08b-fd43-e406-954c-c62ae7345cd0@binghamton.edu">
<pre class="moz-quote-pre" wrap="">I dream of using R, Rmarkdown, knittr, and pdflatex to pull individual
records from a database and generate a form like page 1 here:
<a class="moz-txt-link-freetext" href="https://www.cigna.com/static/www-cigna-com/docs/form-cms1500.pdf">https://www.cigna.com/static/www-cigna-com/docs/form-cms1500.pdf</a>
one pdf form per database record, with the form fields populated. Then I
could print them, and mail the bills to patients' insurers.
</pre>
</blockquote>
If you are planning to print them, rather than submit them
electronically, then might you not do better to start with the <i>static</i>
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
<a class="moz-txt-link-freetext" href="https://www.nucc.org/images/stories/PDF/1500_claim_form_2012_02.pdf">https://www.nucc.org/images/stories/PDF/1500_claim_form_2012_02.pdf</a>,
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.<br>
-- <br>
<i>Philip Taylor</i><br>
</body>
</html>