pdf_scale() scales the contents of a pdf centered within the page.
Arguments
- input
Input pdf filename.
- output
Output pdf filename.
NULLdefaults totempfile(fileext = ".pdf").- ...
Passed to
pdf_apply().- scale
A numeric scalar to scale the content by. Values less than 1 shrink the content within the page; values greater than 1 enlarge it. By default the original content is not rescaled. Note this also adjusts the size of the
grid::viewport()thegrid_fnwill draw in.
Examples
input <- pdf_create_blank(paper = "letter", bg = "blue")
output <- pdf_scale(input, scale = 0.9, dpi = 75)
pdf_width(output)
#> [1] 8.5inches
pdf_height(output)
#> [1] 11inches
unlink(input)
unlink(output)