Reference · Documents and pages · lib.rs

images_to_pdf Function

One page per picture (JPEG, PNG, …), upright by the camera's EXIF flag.

func imagesToPdf(pictures: [Data], fit: ImagePageFit, margin: Double) throws -> Data

Parameters

NameTypeSwift / C#
picturesVec<Vec<u8>>pictures
fitImagePageFitfit
marginf64margin

Returns

Vec<u8>

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.