RenderPageTileToStreamEx

Rendering and printing

Description

Renders a single tile into a caller-owned, seekable stream and reports the pixel bounds and effective rendering choices

Syntax

function TPDFlib.RenderPageTileToStreamEx(DPI: Double;
  Page, PixelLeft, PixelTop, PixelWidth, PixelHeight, Overlap: Integer;
  const Options: TPDFlibPageRasterOptions; Target: TStream;
  out Info: TPDFlibPageRasterInfo): Integer;

Parameters

DPI, PageA positive finite resolution and a 1-based page number
PixelLeft, PixelTop, PixelWidth, PixelHeightThe tile core in pixels from the upper-left of the rotated effective page box. The core must fit inside that page
OverlapThe requested expansion in pixels on every side, clipped at the page bounds
OptionsA TPDFlibPageRasterOptions value selecting the raster format and rendering policies
TargetA caller-owned seekable stream replaced with the encoded image and reset to its start on success
InfoAn output TPDFlibPageRasterInfo receiving the actual overlapped pixel bounds and effective rendering choices

Pixel coordinates start at the upper-left of the rotated effective page box at the requested DPI. The tile core must fit inside that page. Overlap expands the requested rectangle in every direction and stops at the page bounds. Info.PixelBounds includes the actual overlap and uses exclusive right and bottom edges

Format, background, page box, optional-content mode, and policy follow RenderPageRegionToStream

Return values

Returns 1 after replacing the stream with the image and positioning it at the start. Returns 0 if the request is rejected or rendering fails

In physical DPI mode, compute the tile coordinates on the grid that includes the page's /UserUnit. The PagePixelWidth and PagePixelHeight from RenderPageToStreamEx or a tile result describe that grid

Use RenderPageTileToFileEx to publish the same result to a file