一步一步的 PDF 编写器。
A step-by-step PDF writer.
The entry point into the API is the main Pdf, which constructs the document
into one big internal buffer. The top-level writer has many methods to create
specialized writers for specific PDF objects. These all follow the same general
pattern: They borrow the main buffer mutably, expose a builder pattern for
writing individual fields in a strongly typed fashion and finish up the object
when dropped.
There are a few more top-level structs with internal buffers, like the builder
for Content streams, but wherever possible buffers are borrowed from parent
writers to minimize allocations.
The following example creates a PDF with a single, empty A4 page.
…For more examples, check out the examples folder in the repository.
This crate forbids unsafe code, but it depends on a few popular crates that use unsafe internally.
This crate is dual-licensed under the MIT and Apache 2.0 licenses.
暂无开放 Issues,或尚未同步最近议题。