API reference › Rendering & Viewer
rasCreatePageCacheV3
Create the interactive page-cache object (IPGC) that
IPGC __stdcall rasCreatePageCache(PPDF IPDF, int32_t PixFmt, uint32_t HBorder, uint32_t VBorder, uint32_t BackColor);
IPGC __stdcall rasCreatePageCacheV3(PPDF IPDF, TPDFPixFormat PixFmt, float ScreenScale, float Divider, uint32_t TileWidth, uint32_t TileHeight);
void __stdcall rasDeletePageCache(IPGC* CachePtr);
function rasCreatePageCache(const IPDF: PPDF; PixFmt: Integer; HBorder, VBorder, BackColor: Cardinal): IPGC; stdcall;
function rasCreatePageCacheV3(const IPDF: PPDF; PixFmt: TPDFPixFormat; ScreenScale, Divider: Single; TileWidth, TileHeight: Cardinal): IPGC; stdcall;
procedure rasDeletePageCache(var CachePtr: IPGC); stdcall;
Purpose. Create the interactive page-cache object (IPGC) that backs the whole scrollable/zoomable viewer engine (Page Navigation, Layout, and Geometry onward); rasDeletePageCache frees it.
Description. Ignored parameters in the V3 constructor: rasCreatePageCacheV3 accepts Divider, TileWidth, and TileHeight in its ABI but none of the three is ever read — the implementation only stores Doc/PixFmt and, if ScreenScale > 0, an initial C.Zoom. The plain (non-V3) rasCreatePageCache genuinely stores all of HBorder/VBorder/BackColor — but rasCreatePageCacheV3 has no equivalent border/back-color parameters at all and does not inherit any default for them (they stay at the TPageCache type's own zero-value defaults). A cache created via V3 therefore starts with HBorder=VBorder=BackColor=0 regardless of what a caller might expect from the plain constructor's parameter set.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
PixFmt | Pixel format for the cache's rendered tiles. |
HBorder, VBorder, BackColor | *(plain form only)* Genuinely stored. |
ScreenScale | *(V3 only)* If > 0, becomes the cache's initial zoom. |
Divider, TileWidth, TileHeight | *(V3 only)* Accepted but never read — no tiling geometry is actually configured by this call. |
CachePtr | *(Delete only)* var handle; nulled after freeing. Nil-safe (guards both the parameter's own address and its value before proceeding). |
Return value. A new IPGC handle.
C# (P/Invoke)
public static extern IntPtr rasCreatePageCacheV3(IntPtr IPDF, TPDFPixFormat PixFmt, float ScreenScale, float Divider, uint TileWidth, uint TileHeight);
Rasterizer/Rendering
rasCreatePageCacheV3
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.