Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

lifecycle Travis build status AppVeyor build status Coverage status

wimpress

The goal of wimpress is to provide a shiny application to help customisation of PDF files with CSS for Paged Media.

Workflow

This shiny app strongly relies on the very nice package from Romain Lesur, weasydoc, whose goal is to convert R Markdown to PDF using CSS for Paged Media converters. As Romain wrote, CSS for Paged Media [...] allows conversion from HTML to PDF using CSS rules.. If you want to learn more about it, Romain gives some usefull references so I strongly recommand to take a look a his package.

Inputs of this shiny app are CSS properties names and values that can be added and changed by users. These inputs became variables for several sass language files. Sass language is a CSS preprocessor language that allows utilisation of variables, loop, conditional statements... with CSS. These files are converted into one CSS file with the help of the sass RStudio package and used in weasydoc to render the result in a example PDF file.

Installation

You can install the development version of wimpress with:

#install.packages("devtools")
devtools::install.github("BenjaminLouis/wimpress")

Please, be aware that both weasydoc and sass are in development and you have to install them to use wimpress. Note that weasydoc needs extra steps as you need to install WeasyPrint, a CSS for Pages Media converter. Please, refer to the repository of weasydoc for more information.

Usage

You can run the shiny app with :

wimpress::run_app()

CSS for Paged Media allows to change properties for all PDF pages or only the first, last, left or right pages. Besides, you can change only margin properties of these pages. The margins are split into 16 boxes that can independently received CSS rules : the four corners and a subdivision in three boxes of the top, left, bottom and right margins. This allows for example the definition of header and footer. The example document used to see the results of CSS rules is an explanation of how CSS for Paged Media works and how to use it in this app.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

About

Shiny module to prepare PDF template with CSS for Paged Media

Resources

License

Releases

No releases published

Packages

No packages published