pub struct PdfWriter<W: Write> { /* private fields */ }Expand description
Low-level PDF binary writer. Serializes PDF objects to any
Write target while tracking byte offsets for the xref table.
Implementations§
Source§impl<W: Write> PdfWriter<W>
impl<W: Write> PdfWriter<W>
Sourcepub fn write_header(&mut self) -> Result<()>
pub fn write_header(&mut self) -> Result<()>
Write the PDF 1.7 header and binary comment.
Sourcepub fn write_object(&mut self, id: ObjId, obj: &PdfObject) -> Result<()>
pub fn write_object(&mut self, id: ObjId, obj: &PdfObject) -> Result<()>
Write an indirect object, recording its byte offset for xref.
Sourcepub fn current_offset(&self) -> usize
pub fn current_offset(&self) -> usize
Current byte offset in the output.
Sourcepub fn write_xref_and_trailer(
&mut self,
root_id: ObjId,
info_id: Option<ObjId>,
) -> Result<()>
pub fn write_xref_and_trailer( &mut self, root_id: ObjId, info_id: Option<ObjId>, ) -> Result<()>
Write xref table, trailer, startxref, and %%EOF.
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Return the inner writer, consuming this PdfWriter.
Auto Trait Implementations§
impl<W> Freeze for PdfWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for PdfWriter<W>where
W: RefUnwindSafe,
impl<W> Send for PdfWriter<W>where
W: Send,
impl<W> Sync for PdfWriter<W>where
W: Sync,
impl<W> Unpin for PdfWriter<W>where
W: Unpin,
impl<W> UnsafeUnpin for PdfWriter<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for PdfWriter<W>where
W: UnwindSafe,
Blanket Implementations§
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