API referenceAnnotations

pdfGetImportPageLink

Read link-annotation rectangles and their target page out of

C
BOOL32 __stdcall pdfGetImportPageLink(PPDF IPDF, uint32_t PageNum, uint32_t Index, double* L, double* B, double* R, double* T, int32_t* DestPage);
int32_t __stdcall pdfGetImportPageLinkCount(PPDF IPDF, uint32_t PageNum);
Delphi
function pdfGetImportPageLink(const IPDF: PPDF; PageNum, Index: Cardinal; var L, B, R, T: Double; var DestPage: Integer): LongBool; stdcall;
function pdfGetImportPageLinkCount(const IPDF: PPDF; PageNum: Cardinal): Integer; stdcall;

Purpose. Read link-annotation rectangles and their target page out of a page in the currently open import file (pdfOpenImportFile, PDF Import) — not this document's own pages, and not the general pdfGetAnnot/pdfGetPageAnnot mechanisms (Annotation Lifecycle and Enumeration), which only see annotations already committed to this document.

Description. PageNum is converted to 0-based internally (Integer(PageNum) - 1) before being passed to GetImportPageLink/ GetImportPageLinkCount — the ABI's own PageNum is 1-based like every other page-numbering convention in this SDK. This pair exists specifically to let a caller inspect an import source's link structure (e.g. to decide which links to carry over) before/while importing pages via pdfImportPage.

Parameters.

ParameterDescription
IPDFDocument handle (with an open import file).
PageNum1-based page number within the import source.
Index*(GetLink only)* 0-based link index on that import-source page.
L, B, R, T*(GetLink only)* Output: link rectangle.
DestPage*(GetLink only)* Output: the link's target page within the import source.

Return value. pdfGetImportPageLink: True if PageNum/Index resolve within the import file; False otherwise. pdfGetImportPageLinkCount: the link count on that import-source page; 0 if out of range or no import file is open.

See also. pdfOpenImportFile, pdfImportPage.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Annotations
Category

Getters

Exported names

pdfGetImportPageLink

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.