mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-26 04:58:07 +00:00
pdf-dialogs-w10: net change of 3 commits
- pdf-dialogs-w10: written from its sheet - pdf-dialogs-w10: repair 1 - pdf-dialogs-w10: review fixes (review-1)
This commit is contained in:
@@ -88,6 +88,13 @@ pub fn extract_images(src: &ExportSource, pages: &[usize], min_side: u32) -> Res
|
||||
Ok(pdfcraft_create::extract_images(&doc, pages, min_side))
|
||||
}
|
||||
|
||||
/// The backdrop each of `pages` (0-based) paints, in the same order, read from the document state `src` carries, so a
|
||||
/// dialog can check pages on a worker thread.
|
||||
pub fn page_backdrops(src: &ExportSource, pages: &[usize]) -> Result<Vec<Option<pdfcraft_edit::Backdrop>>, String> {
|
||||
let doc = pdfcraft_cos::Document::open_with_password(src.bytes.clone(), src.config.password.as_deref()).map_err(|e| e.to_string())?;
|
||||
Ok(pdfcraft_edit::page_backdrops(&doc, pages))
|
||||
}
|
||||
|
||||
/// The file name for the `index`-th (1-based) exported image: `<stem>_Page_<n>_Image_<index>.<ext>`.
|
||||
/// The page number has leading zeros for as many digits as the document's `page_count` has, so the
|
||||
/// files sort in page order (#2208): page 7 of 120 is `Page_007`.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user