Reference · Rules and helpers · rules.rs
split_size_cuts Function
Pro preview: where to cut so that no part is larger than max_mb. The same measurement the tool uses (shared fonts count once per part).
func splitSizeCuts(input: Data, pageCount: UInt32, maxMb: Double) throws -> [UInt32]public static uint[] SplitSizeCuts(byte[] input, uint pageCount, double maxMb)pub fn split_size_cuts(input: Vec<u8>, page_count: u32, max_mb: f64) -> Result<Vec<u32>, PagewerkError>Parameters
| Name | Type | Swift / C# |
|---|---|---|
input | Vec<u8> | input |
page_count | u32 | pageCount |
max_mb | f64 | maxMb |
Returns
Vec<u32>
Errors
Throws PagewerkError:
Unreadable: “unreadable: {message}”Refused: “refused: {message}”WrongPassword: “wrong password”
Signatures are generated from the engine’s code. Swift is checked against the generated bindings; C# follows the bindings generator’s naming rules.