chromic_pdf v0.5.0 Release Notes
Release Date: 2020-07-10 // almost 4 years ago-
๐ Changed
- โ Removed the
:width
and:height
options fromTemplate.styles/1
andTemplate.source_and_options/1
as it turns out that Chrome does not pay attention to@page
dimensions and instead still sets the size of the produced PDF to US letter. Since it does not seem possible to the PDF size in Chrome headless besides using thepaperWidth
andpaperHeight
options, moved to a:size
option instead that accepts names like:a4
,:us_letter
, and tuples of{<width>, <height>}
in inches. These are then passed topaperWidth
andpaperHeight
. - Ditched the
preferCssPageSize
option fromTemplate.source_and_options/1
as it did not seem to have any effect. See above.
โ Added
- โ Added
zoom: 0.75
to both#header
and#footer
in the template as this seems to be exactly what is needed to reverse the viewport scaling that Chrome uses on them by default. With this, headers & footers and the content can use the same CSS styles. - ๐จ Included
-webkit-print-color-adjust: exact
rule to template sobackground-color
rules are enabled by default.
๐ Fixed
- Make
print_to_pdfa/2
actually acceptsource_and_options()
map fromTemplate
.
- โ Removed the