void* __stdcall tblGetPDFInstance(ITBL Table);
void __stdcall tblSetPDFInstance(ITBL Table, PPDF IPDF);
function tblGetPDFInstance(const Table: ITBL): Pointer; stdcall;
procedure tblSetPDFInstance(const Table: ITBL; const IPDF: PPDF); stdcall;
Purpose. Get/set which document a standalone table draws into — lets a table be created without a document (tblCreateTable(nil, ...)) and bound afterward, or moved to a different document, before tblDrawTable (Table Pagination Cursor, Introspection, and Drawing) is called.
Description. MAJOR VERIFIED BUG: tblSetPDFInstance writes a field that tblDrawTable never reads — the setter has NO effect on whether a table can actually be drawn. tblSetPDFInstance/tblGetPDFInstance exclusively read/write a dedicated PdfInstance field — whose own declaration comment labels it "tblGet/SetPDFInstance round-trip" — while tblDrawTable (Table Pagination Cursor, Introspection, and Drawing) checks and uses a completely different field, Doc, which is populated only by tblCreateTable's own IPDF constructor argument and is never touched by this setter. In the engine, PdfInstance has exactly three references total: its declaration and this get/set pair — it is never read anywhere else, including by tblDrawTable. Practical consequence: a table created via tblCreateTable(nil, ...) (the explicitly-supported "standalone, bind later" workflow) can NEVER be made drawable by calling tblSetPDFInstance afterward — tblDrawTable will keep failing (T.Doc stays nil forever) regardless of how many times tblSetPDFInstance is called. The only way to get a drawable table is to pass a real IPDF directly to tblCreateTable at creation time. tblGetPDFInstance faithfully echoes back whatever was set via the setter — the round-trip itself works — it just has no bearing on the table's real, separate document binding.
Parameters.
| Parameter | Description |
|---|---|
Table | Target table handle. |
IPDF | *(Set only)* Stored in a disconnected field — does not affect tblDrawTable's ability to draw the table. |
Return value. tblGetPDFInstance: the stored PdfInstance pointer (nil if never set) — disconnected from the table's real drawing-capable document binding. tblSetPDFInstance: none.
C# (P/Invoke)
public static extern void tblSetPDFInstance(IntPtr Table, IntPtr IPDF);
Misc
tblSetPDFInstance
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.