API referenceCore SDK

pdfCreateCollection

Create a PDF Portable Collection (/Collection catalog

C
BOOL32 __stdcall pdfCreateCollection(PPDF IPDF, int32_t View);
BOOL32 __stdcall pdfCheckCollection(PPDF IPDF);
BOOL32 __stdcall pdfGetCollectionInfo(void* IPDF, TPDFCollectionInfo* Value);
Delphi
function pdfCreateCollection(const IPDF: PPDF; View: Integer): LongBool; stdcall;
function pdfCheckCollection(const IPDF: PPDF): LongBool; stdcall;
function pdfGetCollectionInfo(IPDF: Pointer; var Value: TPDFCollectionInfo): LongBool; stdcall;

Purpose. Create a PDF Portable Collection (/Collection catalog entry — a package of embedded files with a browsable schema, e.g. an "PDF Portfolio"), validate the current collection's structural integrity, and read back its initial-view configuration.

Description. pdfCreateCollection registers the collection with an initial view mode (View, a TColView ordinal — details, tile, or hidden). pdfCheckCollection is confirmed to always report success (True) for any valid document handle, regardless of what CheckCollectionH's internal validation actually finds — an explicit source comment states "DIFF: dyna reports success" (implying the classic API's own equivalent call can report a genuine failure, but this port's return value does not reflect the check's real outcome). pdfGetCollectionInfo reads back the collection's initial file, initial view, and sort-by field.

Parameters.

ParameterDescription
IPDFDocument handle.
View*(Create only)* Initial /View mode.
Value*(GetInfo only)* Output: InitalFile, InitalView, SortBy (note the struct's own field-name typo, "Initial" spelled "Inital," preserved from the original ABI).

Return value. pdfCreateCollection: True if IPDF valid. pdfCheckCollection: always True for a valid IPDF — does not reflect the actual check outcome. pdfGetCollectionInfo: True if a collection exists.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Object Creation

Exported names

pdfCreateCollection

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.