pub struct PdfMarkBuffer {
pub current_page: u32,
/* private fields */
}Expand description
Buffered pdfmark records. Lives on Context for the entire job;
drained once by the PDF output device at end-of-job. The buffer is
document-global (not VM-level), so save / restore do not roll
it back — pdfmark records issued before a restore survive.
Fields§
§current_page: u32Count of completed showpage calls so far. The interpreter’s
showpage continuation increments this. Page-scoped records
(annotations, page boxes) that omit an explicit /Page key
default to current_page + 1 — i.e. the page currently being
assembled. So after N showpages, current_page == N and the
page-being-assembled is N + 1.
Implementations§
Source§impl PdfMarkBuffer
impl PdfMarkBuffer
pub fn new() -> Self
Sourcepub fn push(&mut self, record: PdfMarkRecord)
pub fn push(&mut self, record: PdfMarkRecord)
Append a record; ordering is preserved.
Sourcepub fn records(&self) -> &[PdfMarkRecord]
pub fn records(&self) -> &[PdfMarkRecord]
Read-only view of accumulated records.
Sourcepub fn drain(&mut self) -> Vec<PdfMarkRecord>
pub fn drain(&mut self) -> Vec<PdfMarkRecord>
Take ownership of the records, leaving the buffer empty. Used by the PDF output device once at end of job.
Trait Implementations§
Source§impl Clone for PdfMarkBuffer
impl Clone for PdfMarkBuffer
Source§fn clone(&self) -> PdfMarkBuffer
fn clone(&self) -> PdfMarkBuffer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more