I would like to use R Markdown or Quarto to make printable PDFs of commercial documents such as Purchase Orders, Sales Orders, Packing Lists, etc. All of the data comes from a database, but I would like to process the data in R and then generate documents with finely controlled layouts.
Each document type would have a template that would require a fair amount of design work to create, but then R could seamlessly prepare the data to fill in to the template and create a PDF.
I am hoping that the template would be defined by code (but probably not R code).
Is anything like this feasible using Rmd, Quarto, or any other R tool? Thanks.