Struct wkhtmltopdf::PdfApplication
[−]
[src]
pub struct PdfApplication { // some fields omitted }
Structure for initializing the underlying wkhtmltopdf
This is effective a wrapper around PdfGuard
that provides
a method for instantiating one a builder
Methods
impl PdfApplication
[src]
fn new() -> Result<PdfApplication>
Initializes Wkhtmltopdf
Wkhtmltopdf will remain initialized for this process until PdfApplication
is dropped.
Wkhtmltopdf may only be initialized once per process, and
and all PDF generation must happen from the same thread that initialized wkhtmltopdf.
Subsequent attempts to initialize wkhtmltopdf will return Error:IllegalInit
.
fn builder(&mut self) -> PdfBuilder
Instantiate a PdfBuilder
This method borrows the self
mutably to ensure only that one builder is active at a time which is a
basic limitation of wkhtmltopdf.
Parallel execution is currently only possible by spawning multiple processes.