Skip to main content

split_by_bookmarks_to_bytes

Function split_by_bookmarks_to_bytes 

Source
pub fn split_by_bookmarks_to_bytes(
    src_bytes: &[u8],
    opts: &SplitByBookmarksOptions,
) -> Result<Vec<(BookmarkSegment, Vec<u8>)>>
Expand description

Execute the split: returns each segment paired with its PDF bytes (parallel to plan_split_by_bookmarks). The source is not modified. Segment ranges are [start_page, end_page) and are fed directly to the editor’s half-open page-range extraction.

§Errors

Propagates planning errors and any extraction failure.