pub struct Obj<'a> { /* private fields */ }
Expand description

Writer for an arbitrary object.

Implementations

Write a primitive object.

Write an array.

Write a dictionary.

Start writing with an arbitrary writer.

For example, using this, you could write a Type 1 font directly into a page’s resource directionary.

use pdf_writer::{PdfWriter, Ref, Name, writers::Type1Font};

let mut w = PdfWriter::new();
w.page(Ref::new(1))
    .resources()
    .fonts()
    .insert(Name(b"F1"))
    .start::<Type1Font>()
    .base_font(Name(b"Helvetica"));

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.