Description Usage Arguments Value Note Author(s) See Also Examples
Extract a range of pages from a PDF file. Preserves hyperlinks that fall within the selected page range.
1 | pdfPageExtract(fileName, firstP = NULL, lastP = NULL, outFileName = NULL)
|
fileName |
character string denoting the path/ name of the input PDF file |
firstP |
integer denoting the first extracted page |
lastP |
integer denoting the last extracted page |
outFileName |
character string denoting the name of the output PDF file.
If not specified, it is
"[ |
Returns nothing, but as a side effect saves the extracted pages as a new .pdf file.
This function is based on Ghostscript.
Christoph Schmidt <schmidtchristoph@users.noreply.github.com>
GPL Ghostscript https://www.ghostscript.com
1 2 3 4 5 6 7 8 | library(d3heatmap)
p <- d3heatmap(mtcars, scale = "column", colors = "Blues")
# pdf contains three pages (1 plot, 2 empty ones)
jsGraphic2Pdf(p, c(2500, 2000, 50, 50))
pdfPageExtract("JSgraphic.pdf", 1, 1)
pdfPageExtract("JSgraphic.pdf", 1, 1, "JSgraphic.pdf")
file.remove("JSgraphic.pdf", "JSgraphic_pages1_1.pdf", "JSgraphic_extr.pdf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.