API referenceCore SDK

pdfGetCompressionFilter

Set/get the compression filter applied to newly-inserted

C
int32_t __stdcall pdfGetCompressionFilter(PPDF IPDF);
BOOL32 __stdcall pdfSetCompressionFilter(PPDF IPDF, int32_t Filter);
Delphi
function pdfGetCompressionFilter(const IPDF: PPDF): Integer; stdcall;
function pdfSetCompressionFilter(const IPDF: PPDF; Filter: Integer): LongBool; stdcall;

Purpose. Set/get the compression filter applied to newly-inserted image streams.

Description. Real: consulted at image-insertion time (E.CompFilter := FCompressionFilter, per V07 E01's InsertFileImage) — "honour current write filter," per an inline source comment — so images inserted after a pdfSetCompressionFilter call use the newly-selected filter; images already inserted before the call keep whichever filter was active at their own insertion time.

Return value. Getter: current filter; 0 if IPDF invalid. Setter: True if IPDF valid.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetCompressionFilter(IntPtr IPDF);
Area
Core SDK
Category

Getters

Exported names

pdfGetCompressionFilter

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.