GetGarbageCollect

Document properties, Optimisation

Description

Queries the state of the automatic mark-sweep garbage collection setting for the currently selected document.

Syntax

Delphi

Function TPDFlib.GetGarbageCollect: Integer;

ActiveX

Function PDFlib::GetGarbageCollect() As Long

DLL

int DLGetGarbageCollect(int InstanceID);

Return values

0Automatic garbage collection during save is disabled.
1Automatic garbage collection during save is enabled.

Remarks

This setting controls whether an automatic garbage collection pass is run over unreferenced indirect objects when the document is written to a file or stream. Use SetGarbageCollect to change this value.

Example

if PDF.GetGarbageCollect = 0 then
  PDF.SetGarbageCollect(1);

See also

SetGarbageCollect, GarbageCollectObjects