Promote verified native PDF and box capacity support
This commit is contained in:
1 parent
3706afa483
commit
72ed779749
31 files changed
+1042
-78
No files matched your search
@@ -167,12 +167,15 @@ pub struct Executor {
|
||||
pdf_colors: crate::pdf_device::PdfColorStacks,
|
||||
pdf_link_stack: Vec<pdf_links::ActiveLink>,
|
||||
pdf_catalog_tokens: Vec<Token>,
|
||||
pdf_info_tokens: Vec<Token>,
|
||||
pdf_images: Vec<pdf_image::RegisteredImage>,
|
||||
input_position: Option<(usize, usize)>,
|
||||
paragraph: Option<super::paragraph::Builder>,
|
||||
vertical: super::boxes::VerticalBuilder,
|
||||
box_frames: Vec<boxes::BoxFrame>,
|
||||
box_nodes_created: usize,
|
||||
material_charge: usize,
|
||||
mark_cells_created: usize,
|
||||
diagnostic_bytes: usize,
|
||||
after_assignment: Option<Token>,
|
||||
after_group_tokens: usize,
|
||||
@@ -291,12 +294,15 @@ impl Executor {
|
||||
pdf_colors: Default::default(),
|
||||
pdf_link_stack: Vec::new(),
|
||||
pdf_catalog_tokens: Vec::new(),
|
||||
pdf_info_tokens: Vec::new(),
|
||||
pdf_images: Vec::new(),
|
||||
input_position: None,
|
||||
paragraph: None,
|
||||
vertical: super::boxes::VerticalBuilder::default(),
|
||||
box_frames: Vec::new(),
|
||||
box_nodes_created: 0,
|
||||
material_charge: 0,
|
||||
mark_cells_created: 0,
|
||||
diagnostic_bytes: 0,
|
||||
after_assignment: None,
|
||||
after_group_tokens: 0,
|
||||
@@ -3107,7 +3113,7 @@ impl Executor {
|
||||
result: Result<(), Error>,
|
||||
files: &mut impl SourceProvider,
|
||||
) -> Result<(), Error> {
|
||||
if let Err(mut error) = result.and_then(|()| self.finish_pdf_catalog()) {
|
||||
if let Err(mut error) = result.and_then(|()| self.finish_pdf_dictionaries()) {
|
||||
if let Err(sink) = files.observe_error(&error) {
|
||||
error
|
||||
.message
|
||||
@@ -3195,8 +3201,10 @@ impl Executor {
|
||||
mut capture_boundary: impl FnMut(&Self, usize, &mut F),
|
||||
) -> Result<(), Error> {
|
||||
loop {
|
||||
self.check_box_capacity(None)?;
|
||||
capture_boundary(self, initial_depth, files);
|
||||
self.process_native_pages(files)?;
|
||||
self.check_box_capacity(None)?;
|
||||
let Some(input) = self.expanded(files)? else {
|
||||
break;
|
||||
};
|
||||
@@ -3530,6 +3538,7 @@ impl Executor {
|
||||
self.scan_pdf_link(primitive, token.span, files)?;
|
||||
}
|
||||
Pdfcatalog => self.scan_pdf_catalog(files)?,
|
||||
Pdfinfo => self.scan_pdf_info(files)?,
|
||||
Pdfximage => self.scan_pdf_image(&token, false, files)?,
|
||||
Pdfrefximage => self.reference_pdf_image(&token, files)?,
|
||||
_ => {
|
||||
@@ -3585,6 +3594,7 @@ impl Executor {
|
||||
}
|
||||
self.validate_pdf_final_state()?;
|
||||
self.end_paragraph(files)?;
|
||||
self.check_box_capacity(None)?;
|
||||
if self.state.group_depth() != initial_depth {
|
||||
return self.fail("unclosed native group at end of input");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user