BOOL32 __stdcall rasMovePage(IPGC CachePtr, uint32_t Source, uint32_t Dest);
BOOL32 __stdcall rasExchangePages(IPGC CachePtr, uint32_t First, uint32_t Second);
BOOL32 __stdcall rasDeletePage(IPGC CachePtr, uint32_t PageNum);
function rasMovePage(CachePtr: IPGC; Source, Dest: Cardinal): LongBool; stdcall;
function rasExchangePages(CachePtr: IPGC; First, Second: Cardinal): LongBool; stdcall;
function rasDeletePage(CachePtr: IPGC; PageNum: Cardinal): LongBool; stdcall;
Purpose. Reorder or delete pages in the underlying document through the page-cache handle — these are real document-mutating operations, not cache-local view state, despite taking an IPGC rather than IPDF.
Description. All three resolve the cache's owning document (GetDoc(C.Doc)) and forward straight to the real document methods — D.MovePageH(Source, Dest), D.ExchangePagesH(First, Second), D.DeletePageH(PageNum) >= 0 — the same underlying page-mutation logic used by the document-level page-management APIs (Page Lifecycle and Geometry). There is no cache-only "view reorder" that leaves the document unchanged; calling any of these three edits the document that every other cache/view onto it will also see.
Parameters.
| Parameter | Description |
|---|---|
CachePtr | Page cache whose owning document is mutated. |
Source, Dest | *(Move only)* 1-based source/destination page numbers. |
First, Second | *(Exchange only)* 1-based page numbers to swap. |
PageNum | *(Delete only)* 1-based page to remove. |
Return value. True on success; False if CachePtr/the owning document doesn't resolve, or the underlying document operation fails.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Rasterizer/Rendering
rasDeletePage
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.