PDF (Printer) module for saucer
-
Using CPM
CPMFindPackage( NAME saucer-pdf VERSION 1.0.1 GIT_REPOSITORY "https://github.com/saucer/pdf" )
-
Using FetchContent
include(FetchContent) FetchContent_Declare(saucer-pdf GIT_REPOSITORY "https://github.com/saucer/pdf" GIT_TAG v1.0.1) FetchContent_MakeAvailable(saucer-pdf)
Finally, link against target:
target_link_libraries(<target> saucer::pdf)
auto webview = saucer::webview{/*...*/};
auto& pdf = webview->add_module<saucer::modules::pdf>();
pdf.save({.file = "page.pdf"});