Reference · Documents and pages · lib.rs
text_to_pdf Function
Text in PDF: laid out by the engine with its own font, the same on every platform. footer: "Seite {n} von {N}".
func textToPdf(input: Data, kind: TextKind, width: Double, height: Double, margin: Double, header: String?, footer: String?) throws -> Datapublic static byte[] TextToPdf(byte[] input, TextKind kind, double width, double height, double margin, string? header, string? footer)pub fn text_to_pdf(input: Vec<u8>, kind: TextKind, width: f64, height: f64, margin: f64, header: Option<String>, footer: Option<String>) -> Result<Vec<u8>, PagewerkError>Parameters
| Name | Type | Swift / C# |
|---|---|---|
input | Vec<u8> | input |
kind | TextKind | kind |
width | f64 | width |
height | f64 | height |
margin | f64 | margin |
header | Option<String> | header |
footer | Option<String> | footer |
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.