ropensci / qpdf

Split, Combine and Compress PDF files
https://docs.ropensci.org/qpdf
Other
57 stars 10 forks source link

Expose overlay feature #11

Closed nuest closed 2 years ago

nuest commented 4 years ago

qpdf has a nice feature to overlay one page over another. I'm looking for this package's equivalent of

system2("qpdf", args = c("--overlay", overlay_file_path, "--to=1", "--", base_file_path, output_file_path))

I'd like to contribute this issue, but have no experience with Rcpp, so I'm a bit lost, frankly.

nuest commented 2 years ago

@jeroen Would you be willing to point me in the right direction here? Since Heroku is discontinuing their free plans it would be great if I can use qpdf in my ShinyApp.

jeroen commented 2 years ago

Ah here is an example https://github.com/qpdf/qpdf/blob/main/examples/pdf-overlay-page.cc

jeroen commented 2 years ago

@nuest can you give an example pdf file of what you need and what the output will look like?

jeroen commented 2 years ago

I've released this in qpdf 1.3.0 on cran. Lmk if this works for you.