Reference · Documents and pages · lib.rs

add_text_layer Function

Lays recognised words invisibly over the pages (the app recognises with Vision).

func addTextLayer(input: Data, pages: [OcrPage]) throws -> Data

Parameters

NameTypeSwift / C#
inputVec<u8>input
pagesVec<OcrPage>pages

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.