API reference › Import & Output APIs
pdfSetImportFlags
Set the flag mask consulted by subsequent page imports.
| Exported names | pdfSetImportFlags |
|---|---|
| Note | Two flags drive behavior — see Description |
Purpose — Set the flag mask consulted by subsequent page imports.
Description — The default at pdfNewPDF is $0FFFFFFE (the ifImportAll mask). Flags that change behavior in this engine:
| Flag | Value | Effect |
|---|---|---|
ifImportAsPage | $80000000 | pdfImportPage creates an editable page instead of a template. |
ifAllAnnots | $009F0000 | Annotations (and, in page mode, AcroForm widget fields) come across with the page. |
The remaining if* bits (ifBookmarks, ifDocInfo, ifJavaScript, …) are accepted and stored for ABI compatibility but not consulted — the corresponding data is imported through its explicit call instead (pdfImportBookmarks, pdfImportDocInfo, pdfImportCatalogObjects, pdfImportOCProperties).
BOOL32 __stdcall pdfSetImportFlags(PPDF IPDF, uint32_t Flags);
function pdfSetImportFlags(const IPDF: PPDF; Flags: Cardinal): LongBool; stdcall; external 'LumasPdf.dll';
Return value — TRUE unless the instance handle is invalid.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetImportFlags
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.