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 -> Datapublic static byte[] AddTextLayer(byte[] input, OcrPage[] pages)pub fn add_text_layer(input: Vec<u8>, pages: Vec<OcrPage>) -> Result<Vec<u8>, PagewerkError>Parameters
| Name | Type | Swift / C# |
|---|---|---|
input | Vec<u8> | input |
pages | Vec<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.