Build native PDF article threads and bead rings
This commit is contained in:
1 parent
de4bd1fa76
commit
4fb0f2c89b
15 files changed
+528
-28
No files matched your search
@@ -230,6 +230,7 @@ pub struct Executor {
|
||||
xdv_colors: crate::pdf_device::xdv_color::ColorState,
|
||||
xdv_annotations: crate::pdf_device::xdv_annotation::AnnotationState,
|
||||
pdf_link_stack: Vec<pdf_links::ActiveLink>,
|
||||
pdf_active_thread: Option<pdf_links::ActiveThread>,
|
||||
pdf_navigation_geometry: pdf_links::NavigationGeometry,
|
||||
pdf_running_links: bool,
|
||||
pdf_interword_spaces: bool,
|
||||
@@ -415,6 +416,7 @@ impl Executor {
|
||||
xdv_colors: Default::default(),
|
||||
xdv_annotations: Default::default(),
|
||||
pdf_link_stack: Vec::new(),
|
||||
pdf_active_thread: None,
|
||||
pdf_navigation_geometry: Default::default(),
|
||||
pdf_running_links: true,
|
||||
pdf_interword_spaces: false,
|
||||
@@ -3713,6 +3715,16 @@ impl Executor {
|
||||
previous: Option<&Execution>,
|
||||
) -> Result<Execution, ExecutionFailure> {
|
||||
self.collect_meaning_reads();
|
||||
let result = result.and_then(|()| {
|
||||
if self.shipped_pages > 0 && !self.format_dumped
|
||||
&& let Some(objects) = self.state.pdf_objects.as_deref_mut()
|
||||
{
|
||||
let compress = self.state.pdf_header_options.is_some_and(|header| header.object_compression > 0);
|
||||
objects.finish_threads(compress, self.limits.tokens)
|
||||
.map_err(|message| self.error(message, self.current))?;
|
||||
}
|
||||
Ok(())
|
||||
});
|
||||
if let Err(error) = result {
|
||||
use sha2::{Digest, Sha256};
|
||||
let source_versions = self
|
||||
|
||||
Reference in new issue
Block a user