PDFium Component Docs

RenderPage 메서드

이 API 항목은 식별자, 시그니처, 코드 블록, PDF 용어를 원래 형태로 유지합니다.
컴포넌트: TPdfView  ·  유닛: PDFium
page의 contents를 device(screen, bitmap, printer)에 렌더링합니다

구문

procedure RenderPage(DeviceContext: HDC; Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []);

DeviceContextHDC. Target device context to render into (screen DC, printer DC, memory DC, etc.).
RotationTRotation. Clockwise rotation to apply when rendering: ro0, ro90, ro180, or ro270.
OptionsTRenderOptions. Set of rendering flags controlling annotation display, LCD text, grayscale, etc.

 

function RenderPage(Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []): TBitmap;

RotationTRotation. Clockwise rotation to apply when rendering.
OptionsTRenderOptions. Set of rendering flags.

 

procedure RenderPage(Bitmap: TBitmap; Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []);

BitmapTBitmap. An existing bitmap to render the page into.
RotationTRotation. Clockwise rotation to apply when rendering.
OptionsTRenderOptions. Set of rendering flags.

설명

현재 page를 지정한 위치와 크기로 목표 destination에 렌더링합니다. 세 가지 overload가 있습니다:

background fill color는 PageColor에서 가져옵니다. 타일 방식의 고해상도 렌더링에는 RenderTile을 사용하세요

예제

// Render current page to a 600x800 bitmap
var Bmp: TBitmap;
begin
  Bmp := PdfView.RenderPage(0, 0, 600, 800);
  try
    Bmp.SaveToFile('page.bmp');
  finally
    Bmp.Free;
  end;
end;

참고 항목

TPdfView.RenderTile, TPdfView.Zoom, TPdfView.PageRotation, TPdfView.PageColor