procedure RenderPage(DeviceContext: HDC; Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []);
| DeviceContext | HDC. 要渲染到的目标设备上下文(屏幕 DC、打印机 DC、内存 DC 等) |
| Rotation | TRotation. 渲染时应用的顺时针旋转:ro0、ro90、ro180 或 ro270 |
| Options | TRenderOptions. 控制注释显示、LCD 文本、灰度等的渲染标志集 |
function RenderPage(Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []): TBitmap;
| Rotation | TRotation. 渲染时应用的顺时针旋转 |
| Options | TRenderOptions. 渲染标志集 |
procedure RenderPage(Bitmap: TBitmap; Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []);
| Bitmap | TBitmap. 要渲染页面进去的现有位图 |
| Rotation | TRotation. 渲染时应用的顺时针旋转 |
| Options | TRenderOptions. 渲染标志集 |
将当前页面渲染到指定目标、指定位置和大小。提供三个重载:
TBitmap 并渲染进去。调用方必须释放返回的位图TBitmap(不分配)背景填充色取自 PageColor。对于分块高分辨率渲染,使用 RenderTile
// 将当前页面渲染为 600x800 位图
var Bmp: TBitmap;
begin
Bmp := PdfView.RenderPage(0, 0, 600, 800);
try
Bmp.SaveToFile('page.bmp');
finally
Bmp.Free;
end;
end;