pub struct DebugVisualizer { /* private fields */ }Available on crate feature
rendering only.Expand description
Debug visualizer for PDF pages.
Implementations§
Source§impl DebugVisualizer
impl DebugVisualizer
Sourcepub fn new(options: DebugOptions) -> Self
pub fn new(options: DebugOptions) -> Self
Create a new debug visualizer with the given options.
Sourcepub fn render_debug_page(
&self,
pdf: &mut Pdf,
page: usize,
) -> Result<RenderedImage>
pub fn render_debug_page( &self, pdf: &mut Pdf, page: usize, ) -> Result<RenderedImage>
Render a debug visualization of a page.
This renders the page with bounding boxes overlaid for each element type.
Requires the “rendering” feature.
Sourcepub fn render_debug_page_to_file(
&self,
pdf: &mut Pdf,
page: usize,
path: impl AsRef<Path>,
) -> Result<()>
pub fn render_debug_page_to_file( &self, pdf: &mut Pdf, page: usize, path: impl AsRef<Path>, ) -> Result<()>
Render a debug visualization and save to file.
Requires the “rendering” feature.
Sourcepub fn export_elements_json(&self, page: &PdfPage) -> Result<String>
pub fn export_elements_json(&self, page: &PdfPage) -> Result<String>
Export page elements to JSON format.
This produces a structured representation of all elements on the page.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DebugVisualizer
impl RefUnwindSafe for DebugVisualizer
impl Send for DebugVisualizer
impl Sync for DebugVisualizer
impl Unpin for DebugVisualizer
impl UnsafeUnpin for DebugVisualizer
impl UnwindSafe for DebugVisualizer
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.