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

The collection of Unicode characters visible in a single PdfPage.

Since PdfPageText implements both the ToString and the Display traits, you can use [PdfPageText::to_string()] 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 PDF file 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.

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 PDF file.

In complex custom layouts, the order in which characters are defined in the PDF file 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 PDF file.

In complex custom layouts, the order in which characters are defined in the PDF file 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.

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

Performs the conversion.

Performs the conversion.

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.