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]

Parameters

NameTypeSwift / C#
inputVec<u8>input
page_countu32pageCount
max_mbf64maxMb

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.