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

The collection of Unicode characters visible in a single PdfPage.

Use the PdfPageText::all() function to easily return all characters in the containing PdfPage in the order in which they are defined in the PDF file.

In complex custom layouts, the order in which characters are defined in the document and the order in which they appear visually during rendering (and thus the order in which they are read by a user) may not necessarily match.

PdfPageText implements both the ToString and the Display traits.

Implementations

Returns the total number of characters in all text boxes in the containing PdfPage.

The character count includes whitespace and newlines, and so may differ slightly from the result of calling PdfPageText::all().len().

Returns true if there are no characters in any text box collection in the containing PdfPage.

Returns all characters that lie within the containing PdfPage, in the order in which they are defined in the document.

In complex custom layouts, the order in which characters are defined in the document and the order in which they appear visually during rendering (and thus the order in which they are read by a user) may not necessarily match.

Returns all characters that lie within the bounds of the given PdfRect in the containing PdfPage, in the order in which they are defined in the document.

In complex custom layouts, the order in which characters are defined in the document and the order in which they appear visually during rendering (and thus the order in which they are read by a user) may not necessarily match.

Returns all characters assigned to the given PdfPageTextObject in this PdfPageText object.

Trait Implementations

Formats the value using the given formatter. Read more

Closes the PdfPageText collection, releasing held memory.

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

Converts the given value to a String. 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.