Creating a "good looking" PDF document using input from Shiny Dashboard Session



I am developing a Shiny dashboard that produces a PDF file (currently using a Rmd chunks) based on submitted input information from the Shiny session. The full dashboard has 8 panels with 4 data outputs each, so the user can choose up to 32 separate outputs. I also want to provide customized text based in the users selection.

Currently, I am passing information from the Shiny session to the Rmd document using a set of params. For example:
outChk: NA # a list of check box values
fips: NA # a place code
ctyName: NA # a place name
curACS: NA # a dataset flag
curYr: NA # a year value

The Rmd output is remarkably ugly. I have been trying to use the tukey template (modifying the tukey file structure provided by R-Studio), but have run into errors about “! Undefined control sequence”. I am using tinytex as the latex engine.

Does anyone have an example of using to tukey template to produce a customized pdf document?

Thanks in advance.


Not really an answer, just some words about a recent experience.

Since pandoc now supports direct PDF generation from markdown+CSS using wkhtmltopdf, weasyprint and prince, I did some tests and I am really enthusiastic. I also used the webshot package and found it great (wkhtmltopdf and webshot both use WebKit). I think that CSS is a great mean to control PDF rendering.
If you are interested in, I put on GitHub my custom rmarkdown output_format. It’s a very first draft.


Thanks rlesur. I’ll give these a shot.
Cheers-- AB


This is an update.
I was able to build a Sweave document that worked with my Shiny app and produces what I need. I had to start from scratch and learn a lot more latex that I expected. However, it works.
My site is now live.

Thanks to everyone in the community for your assistance!