Write per-page pdfTeX ProcSet from shipped resources
This commit is contained in:
1 parent
de481fd762
commit
1fe0ac9dd5
10 files changed
+162
-15
No files matched your search
@@ -32,6 +32,19 @@ pub struct PdfPageData {
|
||||
pub driver: PdfDriver,
|
||||
pub file: PdfFileOptions,
|
||||
pub stream_compression: u8,
|
||||
#[serde(default, skip_serializing_if = "is_zero")]
|
||||
pub omit_procset: i32,
|
||||
}
|
||||
|
||||
fn is_zero(value: &i32) -> bool {
|
||||
*value == 0
|
||||
}
|
||||
|
||||
impl PdfPageData {
|
||||
pub(crate) fn writes_procset(&self) -> bool {
|
||||
self.driver == PdfDriver::PdfTeX
|
||||
&& (self.omit_procset < 0 || (self.omit_procset == 0 && self.file.major < 2))
|
||||
}
|
||||
}
|
||||
|
||||
/// TeX round_xn_over_d, including signed halfway cases.
|
||||
|
||||
Reference in new issue
Block a user