pub fn print(
path: &Path,
password: Option<&str>,
title: &str,
layers: Option<&[bool]>,
) -> Result<bool>Expand description
Prints the PDF at path (unlocked with password if it has one)
through PDFKit’s print operation: the system print panel, then the job
named title. layers is the reader’s choice of layers, if it differs
from the document’s default; the job prints what that shows. Must run
on the main thread, which it blocks while the panel is up, and opens the
file again there, since a Document stays on the thread that opened
it. Returns whether it printed (false if cancelled). Fails off the main
thread, for an unreadable file, when the layers can’t be switched, or
when the PDF forbids printing.