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

A single attached data file embedded in a PdfDocument.

Implementations

Returns the PdfiumLibraryBindings used by this PdfAttachment.

Returns the name of this PdfAttachment.

Returns the size of this PdfAttachment in bytes.

Returns true if there is no byte data associated with this PdfAttachment.

Writes this PdfAttachment to a new byte buffer, returning the byte buffer.

Writes this PdfAttachment to the given writer.

Writes this PdfAttachment to the file at the given path.

This function is not available when compiling to WASM. You have several options for saving attachment data in WASM:

  • Use either the PdfAttachment::save_to_writer() or the PdfAttachment::save_to_bytes() functions, both of which are available when compiling to WASM.
  • Use the PdfAttachment::save_to_blob() function to save attachment data directly into a new Javascript Blob object. This function is only available when compiling to WASM.

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 alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
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.