API referenceImport & Output APIs

pdfSetImportFlags

Set the flag mask consulted by subsequent page imports.

Exported namespdfSetImportFlags
NoteTwo 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:

FlagValueEffect
ifImportAsPage$80000000pdfImportPage creates an editable page instead of a template.
ifAllAnnots$009F0000Annotations (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).

C
BOOL32 __stdcall pdfSetImportFlags(PPDF IPDF, uint32_t Flags);
Delphi
function pdfSetImportFlags(const IPDF: PPDF; Flags: Cardinal): LongBool; stdcall; external 'LumasPdf.dll';

Return valueTRUE unless the instance handle is invalid.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Import & Output APIs
Category

Setters

Exported names

pdfSetImportFlags

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.