docs.rs failed to build lopdf-0.3.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
lopdf-0.32.0
lopdf
A Rust library for PDF document manipulation.
Example Code
- Create new PDF document
extern crate lopdf;
use ;
use ;
let mut doc = new;
doc.version = "1.5".to_string;
doc.add_object;
doc.add_object;
doc.add_object;
doc.add_object;
doc.add_object;
doc.add_object;
doc.add_object;
doc.add_object;
doc.add_object;
let mut dict = new;
dict.set;
dict.set;
dict.set;
doc.add_object;
doc.compress;
doc.save.unwrap;
- Read PDF document
let mut doc = load.unwrap;
FAQ
-
Why keeping everything in memory as high-level objects until finallay serializing the entire document?
Normally a PDF document won't be very large, ranging form tens of KB to hundreds of MB. Memory size is not a bottle neck for today's computer. By keep the whole document in memory, stream length can be pre-calculated, no need to use a reference object for the Length entry, the resulting PDF file is smaller for distribution and faster for PDF consumers to process.
Producing is a one-time effort, while consuming is many more.