FillPDFBlock

Blocks, Interaction

Description

Personalises a PDF block by placing a page from another open document into its rectangle

Syntax

Delphi

Function FillPDFBlock(Page, BlockIndex: Integer; SourceDocumentID,
  SourcePage: Integer; Options: Integer): Integer;

ActiveX

Function PDFlib::FillPDFBlock(Page As Long, BlockIndex As Long, SourceDocumentID As Long, SourcePage As Long, Options As Long) As Long

DLL

int DLFillPDFBlock(int InstanceID, int Page, int BlockIndex, int SourceDocumentID, int SourcePage, int Options);

Parameters

Page, BlockIndexBlock selector
SourceDocumentIDDocument id of the open source document, as reported by SelectedDocument after loading it
SourcePage1-based source page number
OptionsBit 1 deletes the block annotation after a successful fill; bit 2 stretches to the exact rectangle instead of preserving the aspect ratio

Return values

1 when the page was placed, 0 when the block is missing, not a PDF block, or the import failed

Remarks

The source page keeps its aspect ratio and is centred inside the rectangle by default

See also

GetBlockCount, AddBlock, GetBlockType, GetBlockRect