Documentation
¶
Overview ¶
Package export provides a C ABI for the Folio PDF library. Every Go object exposed to C is stored in an opaque handle table. C callers receive uint64 handle IDs and never see raw Go pointers.
Error convention: all functions return int32 (0 = success, negative = error). Call folio_last_error() to retrieve the error message string.
Package export provides a C ABI for the Folio PDF library, enabling use from C, Python, Ruby, Java (JNI), .NET (P/Invoke), and any language with a C FFI.
All Go objects are stored in an opaque handle table; C callers receive uint64 handles and never see raw Go pointers. Functions follow a consistent convention: return int32 (0 = success, negative = error code) with detailed messages retrievable via folio_last_error.
The exported functions are organized by module:
- cabi_document.go — Document creation, pages, metadata
- cabi_layout.go — Layout elements (paragraphs, tables, etc.)
- cabi_font.go — Font loading and embedding
- cabi_image.go — Image loading
- cabi_reader.go — PDF reading and text extraction
- cabi_sign.go — Digital signatures
- cabi_forms.go — AcroForm fields
- cabi_redact.go — Text redaction
- cabi_import.go — Page import
Build with -buildmode=c-shared to produce a shared library.
Source Files
¶
- cabi.go
- cabi_barcode.go
- cabi_buffer.go
- cabi_callback.go
- cabi_columns.go
- cabi_div.go
- cabi_document.go
- cabi_document_ext.go
- cabi_document_ext2.go
- cabi_drawing.go
- cabi_flex.go
- cabi_float.go
- cabi_font.go
- cabi_forms.go
- cabi_forms_ext.go
- cabi_grid.go
- cabi_header_footer.go
- cabi_heading.go
- cabi_html.go
- cabi_image.go
- cabi_import.go
- cabi_layout_ext.go
- cabi_link.go
- cabi_list.go
- cabi_merge.go
- cabi_page.go
- cabi_page_ext.go
- cabi_paragraph.go
- cabi_reader.go
- cabi_redact.go
- cabi_sign.go
- cabi_svg.go
- cabi_tab.go
- cabi_table.go
- cabi_tagged.go
- cabi_textrun.go
- cabi_v062.go
- cabi_write_options.go
- doc.go