API reference › Rendering & Viewer
rasProcessErrors
rasCloseFile resets the cache's view state (not the
void __stdcall rasCloseFile(IPGC CachePtr);
BOOL32 __stdcall rasProcessErrors(IPGC CachePtr);
BOOL32 __stdcall rasGetRasInfo(IPGC CachePtr, TPDFRasInfo* Info);
BOOL32 __stdcall rasGetCurrTile(IPGC CachePtr, TPDFTile* Tile);
procedure rasCloseFile(CachePtr: IPGC); stdcall;
function rasProcessErrors(CachePtr: IPGC): LongBool; stdcall;
function rasGetRasInfo(CachePtr: IPGC; var Info: TPDFRasInfo): LongBool; stdcall;
function rasGetCurrTile(CachePtr: IPGC; var Tile: TPDFTile): LongBool; stdcall;
Purpose. rasCloseFile resets the cache's view state (not the underlying document — see below); rasProcessErrors is a handle-liveness check; rasGetRasInfo/rasGetCurrTile report the cache's attached main buffer and the most recently rendered tile.
Description. rasCloseFile does not close any file — it resets C.CurrPage := 1, clears HasSel/SelTextBuf, and zeroes ScrollX/ScrollY, i.e. it returns the *view* to its initial state without touching the underlying document handle or any file resource; a caller wanting to actually close the document must use the document-level close/free APIs (V03). rasProcessErrors is trivial — Result := (C <> nil) — it does not drain or report any actual error queue despite the name; treat it as a liveness check only. rasGetRasInfo requires a main tile buffer to already be attached (rasInitMainTile, Rasterizer and Page-Cache Lifecycle) and reports it back (Buffer/Width/Height/ Stride) — Info.Rows/Info.BmpInfo are always nil, never populated. rasGetCurrTile returns the tile metadata cached by the most recent successful rasRenderTile call; fails if no tile has been rendered yet (HasLastTile = False).
Parameters.
| Parameter | Description |
|---|---|
CachePtr | Target page cache. |
Info | *(GetRasInfo only)* Output: main-buffer geometry; Rows/BmpInfo always nil. |
Tile | *(GetCurrTile only)* Output: the most recently rendered tile's metadata. |
Return value. rasProcessErrors: True if CachePtr resolves (not an actual error-queue result). rasGetRasInfo: True if a main buffer is attached. rasGetCurrTile: True if a tile has been rendered since the last abort/reset.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Rasterizer/Rendering
rasProcessErrors
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.