creating a pdf version of a complicated form, populated with data from a database
karl at aspodata.se
karl at aspodata.se
Thu Apr 11 12:45:45 CEST 2024
Christopher Ryan:
> Thanks everyone for the ideas. Lots to think about! Not recreating all the
> lines, boxes, and other adornments on the form makes sense.
Recreating the document seems to be overkill. Also it could fail if the
people receiving it does ocr and expect things to be in their "usual"
places.
The way to do this with the least overhead is to extend the PostScript
example I sent. That said, I don't know much about forms in pdfs and if
that would be way to solve this.
> [...], and I
> remember the workflow, data management, and preparations for billing being
> very tedious.
Billing is a thing that is suitable to be done automatic.
You have to know:
. the general requirements for invoices in your country (usually
specified in some law or similar)
. what layout you prefer
and write a program that converts your billing data to (I suggest) a
tex/latex file. If you need help with that ask for help.
> I've created a REDCap project to manage most of the
> operation.
>From what I read on https://en.wikipedia.org/wiki/REDCap, REDCap seems
to be a bit inflexible. Also it is done starting from an excel file,
which implies working on a MS-Windows box.
> R has a nice capability to interface with REDCap via an API. R
> is the only programming language I have any facility with.
If you are confortable with R, then use it. And there seems to be good
support for latex with Sweave and knitr. But I havn't found any way,
in R, to print out lines like "22.5 675 moveto (X) show". This is how
far I got:
> data <- c(22.5, 675, "X")
> print(data)
[1] "22.5" "675" "X"
>
And knitr is a little vague on how it does things.
Regards,
/Karl Hammar
More information about the texhax
mailing list.