Write native pdfTeX Form XObjects
This commit is contained in:
1 parent
7ff988031f
commit
c2d3312e5a
23 files changed
+534
-88
No files matched your search
@@ -1085,7 +1085,17 @@ impl CompileJob {
|
||||
files.write_layout_manifest(path, e, &pages, &source_map)?;
|
||||
}
|
||||
evidence.phase = AttemptPhase::Fonts;
|
||||
let mut forms = pages.first_mut().map(|first| std::mem::take(&mut first.forms))
|
||||
.unwrap_or_default();
|
||||
let actual_pages = pages.len();
|
||||
pages.extend(forms.iter_mut().map(|form| std::mem::take(&mut form.list)));
|
||||
let fonts = self.compiler.font_cache.resolve(&mut pages, files);
|
||||
for (form, list) in forms.iter_mut().zip(pages.drain(actual_pages..)) {
|
||||
form.list = list;
|
||||
}
|
||||
if let Some(first) = pages.first_mut() {
|
||||
first.forms = forms;
|
||||
}
|
||||
let reported = report(files, &request);
|
||||
if let Err(error) = fonts {
|
||||
if let Err(report) = reported {
|
||||
|
||||
@@ -803,6 +803,11 @@ impl Files {
|
||||
paint_order.push(json!(["rule", rules.len()]));
|
||||
rules.push(json!({"x": x, "y": y, "width": width, "height": height}));
|
||||
}
|
||||
DisplayItem::PdfForm { x, y, form } => {
|
||||
paint_order.push(json!(["pdf_form", images.len()]));
|
||||
images.push(json!({"x": x, "y": y, "width": form.width,
|
||||
"height": form.height, "depth": form.depth, "id": form.number}));
|
||||
}
|
||||
DisplayItem::PdfImage {
|
||||
x,
|
||||
y,
|
||||
|
||||
Reference in new issue
Block a user