mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
PDF: expose the page range as two Preferences numbers
This commit is contained in:
1 parent
fb66c11df6
commit
84644de102
2 files changed
+10
-4
No files matched your search
@@ -957,7 +957,10 @@ pub fn import_options(prefs: &crate::prefs::Preferences) -> photocraft_io::Impor
|
||||
max_group_depth: prefs.file_handling.rasterize_svg_groups_deeper_than as usize,
|
||||
demosaic: prefs.raw_defaults.demosaic.method(),
|
||||
pdf_dpi: prefs.file_handling.pdf_dpi,
|
||||
pdf_pages: prefs.file_handling.pdf_pages,
|
||||
pdf_pages: (prefs.file_handling.pdf_first_page > 0).then(|| {
|
||||
let first = prefs.file_handling.pdf_first_page;
|
||||
(first, prefs.file_handling.pdf_last_page.max(first))
|
||||
}),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,8 +495,10 @@ pub struct FileHandling {
|
||||
pub ignore_exif_profile_tag: bool,
|
||||
/// PDF import resolution in DPI; the document keeps it so the page's print size is preserved.
|
||||
pub pdf_dpi: f32,
|
||||
/// PDF import page range, 1-based and inclusive; `None` imports every page.
|
||||
pub pdf_pages: Option<(u32, u32)>,
|
||||
/// The first PDF page to import (1-based; 0 imports from the first page).
|
||||
pub pdf_first_page: u32,
|
||||
/// The last PDF page to import (1-based; 0 imports to the last page).
|
||||
pub pdf_last_page: u32,
|
||||
/// Most renderers write ACEScg EXRs without stating the colour space. With this on, an EXR
|
||||
/// that would otherwise open as linear sRGB opens as ACEScg (AP1, linear) instead.
|
||||
pub exr_aces_cg: bool,
|
||||
@@ -535,7 +537,8 @@ impl Default for FileHandling {
|
||||
recover_on_launch: true,
|
||||
ignore_exif_profile_tag: false,
|
||||
pdf_dpi: 300.0,
|
||||
pdf_pages: None,
|
||||
pdf_first_page: 0,
|
||||
pdf_last_page: 0,
|
||||
exr_aces_cg: false,
|
||||
ask_before_saving_layered_tiff: true,
|
||||
maximize_psd_compatibility: Ask::Always,
|
||||
|
||||
Reference in new issue
Block a user