Struct pdf_writer::PdfWriter [−][src]
pub struct PdfWriter { /* fields omitted */ }
Expand description
The root writer.
Implementations
impl PdfWriter
[src]
impl PdfWriter
[src]Core methods.
pub fn new(major: i32, minor: i32) -> Self
[src]
pub fn new(major: i32, minor: i32) -> Self
[src]Create a new PDF writer with the default buffer capacity (currently 8 KB).
This already writes the PDF header containing the (major, minor) version.
pub fn with_capacity(capacity: usize, major: i32, minor: i32) -> Self
[src]
pub fn with_capacity(capacity: usize, major: i32, minor: i32) -> Self
[src]Create a new PDF writer with the specified initial buffer capacity.
This already writes the PDF header containing the (major, minor) version.
pub fn set_indent(&mut self, indent: usize)
[src]
pub fn set_indent(&mut self, indent: usize)
[src]Set the indent level per layer of nested objects.
Default value: 0.
impl PdfWriter
[src]
impl PdfWriter
[src]Indirect objects.
pub fn indirect(&mut self, id: Ref) -> Any<'_, IndirectGuard>
[src]
pub fn indirect(&mut self, id: Ref) -> Any<'_, IndirectGuard>
[src]Start writing an indirectly referenceable object.
pub fn type1_font(&mut self, id: Ref) -> Type1Font<'_>
[src]
pub fn type1_font(&mut self, id: Ref) -> Type1Font<'_>
[src]Start writing a Type-1 font.
pub fn type0_font(&mut self, id: Ref) -> Type0Font<'_>
[src]
pub fn type0_font(&mut self, id: Ref) -> Type0Font<'_>
[src]Start writing a Type-0 font.
pub fn cid_font(&mut self, id: Ref, subtype: CidFontType) -> CidFont<'_>
[src]
pub fn cid_font(&mut self, id: Ref, subtype: CidFontType) -> CidFont<'_>
[src]Start writing a CID font.
pub fn font_descriptor(&mut self, id: Ref) -> FontDescriptor<'_>
[src]
pub fn font_descriptor(&mut self, id: Ref) -> FontDescriptor<'_>
[src]Start writing a font descriptor.
impl PdfWriter
[src]
impl PdfWriter
[src]Streams.
pub fn stream<'a>(&'a mut self, id: Ref, data: &'a [u8]) -> Stream<'a>
[src]
pub fn stream<'a>(&'a mut self, id: Ref, data: &'a [u8]) -> Stream<'a>
[src]Start writing an indirectly referenceable stream.
The stream data and the /Length
field are written automatically. You
can add additional key-value pairs to the stream dictionary with the
returned stream writer.
pub fn cmap<'a>(&'a mut self, id: Ref, cmap: &'a [u8]) -> CmapStream<'a>
[src]
pub fn cmap<'a>(&'a mut self, id: Ref, cmap: &'a [u8]) -> CmapStream<'a>
[src]Start writing a character map stream.
If you want to use this for a /ToUnicode
CMap, you can use the
UnicodeCmap
builder to construct the data.