IsFeatureAvailable

Getting started, editions

Description

Returns True when this instance's edition includes a capability catalog feature

Syntax

Delphi

Function TPDFlib.IsFeatureAvailable(Const FeatureID: WideString): Boolean;

ActiveX

Function PDFlib::IsFeatureAvailable(FeatureID As String) As Long

DLL

int DLIsFeatureAvailable(int InstanceID, const wchar_t* FeatureID);
int DLIsFeatureAvailableA(int InstanceID, const char* FeatureID);

Parameters

FeatureIDCase-sensitive capability identifier; an unknown or empty value is not treated as a missing feature but reports False with LastErrorCode 908 (PDFLIB_ERROR_UNKNOWN_FEATURE_ID)

Return values

TrueThe instance edition includes the feature; runtime readiness is reported separately
FalseThe feature is not included, or the identifier is empty or unknown, in which case LastErrorCode is 908

A convenience form of GetFeatureAvailability for callers that only need the edition-inclusion answer and would otherwise parse the JSON record. ActiveX, DLL and Dylib return 1 for True and 0 for False, because no shipped binding returns a Pascal Boolean

Feature IDs are case-sensitive; enumerate GetEditionCapabilities to discover them. An unknown or empty ID returns False and sets LastErrorCode to 908 (PDFLIB_ERROR_UNKNOWN_FEATURE_ID) rather than silently reporting the feature as missing

Inclusion is not runtime readiness. An included feature can still need a rendering backend, OCR language data, a professional barcode encoder, configured signing providers or caller-supplied credentials; read runtimeAvailability and localDependencyAvailability from GetFeatureAvailability, and use ProbeWorkflowRequest to check one concrete request without producing output

Example

If PDF.IsFeatureAvailable('business.invoice-rules') Then
  Report:= PDF.ValidateInvoiceBusinessRulesBuiltIn(EmbeddedName)
Else
  Log('E-invoice business rules need the Small Business edition');

GetFeatureAvailability · GetEditionCapabilities · Edition comparison