ReleaseCapturedPage

Page layout, resource management

Declaration

Function TPDFlib.ReleaseCapturedPage(CaptureID: Integer): Integer;

Description

Invalidates a captured-page handle and releases its transient descriptor state when the caller no longer needs another placement

Form XObjects already installed in page resource dictionaries and their existing Do invocations remain valid after the handle is released

A released handle cannot be drawn, configured or released again

Parameters

CaptureIDA handle returned by CapturePage, CapturePageEx, ImportPageAsFormXObject or EndFormXObject

Return values

0The handle is invalid or has already been released
1The transient capture state was released successfully

Example

CaptureID := PDF.EndFormXObject;
if CaptureID <> 0 then
begin
  PDF.DrawCapturedPage(CaptureID, 20, 20, 120, 40);
  PDF.ReleaseCapturedPage(CaptureID);
end;

See also

DrawCapturedPage, TPDFlibDynamicComponentSession