PDFium Component Docs

RenderTile 메서드

이 API 항목은 식별자, 시그니처, 코드 블록, PDF 용어를 원래 형태로 유지합니다.
컴포넌트: TPdfView  ·  유닛: PDFium
page의 사각형 영역을 새 bitmap으로 렌더링합니다. 반환된 bitmap은 수동으로 해제해야 합니다

구문

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

RotationTRotation. Clockwise rotation to apply when rendering the tile: ro0, ro90, ro180, or ro270.
OptionsTRenderOptions. Set of rendering flags controlling annotation visibility, LCD text, etc.

 

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

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

설명

현재 page의 사각형 타일을 bitmap으로 렌더링합니다. Left, Top, Width, HeightPageWidth × PageHeight pixel 크기의 가상 전체 page 렌더링 안에서 타일 영역을 정의합니다. 이를 통해 큰 page를 더 작은 메모리 효율적 타일로 고해상도 렌더링할 수 있습니다

function overload는 새 TBitmap를 할당하며 호출자가 반드시 해제해야 합니다. procedure overload는 기존 bitmap에 렌더링합니다. 이 method는 높은 DPI 인쇄나 화면보다 높은 해상도의 image export를 만들 때 유용합니다

예제

// Render the top-left 512x512 tile of a 2048x2048 full-page render
var Bmp: TBitmap;
begin
  Bmp := PdfView.RenderTile(0, 0, 512, 512, 2048, 2048);
  try
    Image1.Picture.Assign(Bmp);
  finally
    Bmp.Free;
  end;
end;

참고 항목

TPdfView.RenderPage, TPdfView.Zoom, TPdfView.PageRotation