Export Multi-Tab Shiny App to PDF

,

Some of the dataframes in my shiny app are around 25 columns (I have horizontal scrolling in the DT output). I want to be able to neatly layout two of the 6 tabs with multiple plots and longer tables into one PDF file. How do I do this?

The very general steps would look like this:

  1. Create an RMarkdown or Quarto template file that can accept parameters for dynamically generating reports with e.g. knitr::knit(params = list())
  2. Create infrastructure in the Shiny application to pass all of the necessary data objects and arguments from the app to the knitting function.
  3. Create a download handler in the app that will allow users to download the rendered PDF.

Without more details on the Shiny app, however, it'd be difficult to give more concrete guidance.