Table of Contents

Class RenderedPage

Namespace
PdfEngine.Rendering
Assembly
PdfEngine.Abstractions.dll

Raw rendered pixel buffer in 32-bit BGRA format, completely UI-neutral and memory-managed.

public class RenderedPage : IDisposable
Inheritance
RenderedPage
Implements
Inherited Members

Constructors

RenderedPage(int, int, int, int, double, PageRotation, IMemoryOwner<byte>)

Wraps a rendered pixel buffer. The page takes ownership of pixelMemory.

public RenderedPage(int pageNumber, int widthPixels, int heightPixels, int stride, double dpi, PageRotation rotation, IMemoryOwner<byte> pixelMemory)

Parameters

pageNumber int

The page number, starting at 1.

widthPixels int

The width in pixels.

heightPixels int

The height in pixels.

stride int

The bytes per pixel row.

dpi double

The resolution of the render.

rotation PageRotation

The viewer rotation of the request.

pixelMemory IMemoryOwner<byte>

The BGRA pixel buffer.

Properties

ByteLength

The size of the pixel data in bytes (Stride x HeightPixels).

public long ByteLength { get; }

Property Value

long

Dpi

The resolution the page was rendered at. For a request sized in pixels it is the resolution of that size, not Dpi; when the horizontal and vertical resolutions differ, it is the larger.

public double Dpi { get; }

Property Value

double

HeightPixels

The height of the image in pixels.

public int HeightPixels { get; }

Property Value

int

PageNumber

The rendered page number, starting at 1.

public int PageNumber { get; }

Property Value

int

PixelMemory

The owner of the pixel buffer. Dispose() releases it.

public IMemoryOwner<byte> PixelMemory { get; }

Property Value

IMemoryOwner<byte>

Pixels

The pixels: 32-bit BGRA, premultiplied alpha, rows from top to bottom, Stride bytes per row.

public ReadOnlyMemory<byte> Pixels { get; }

Property Value

ReadOnlyMemory<byte>

Rotation

The viewer rotation of the request.

public PageRotation Rotation { get; }

Property Value

PageRotation

Stride

The number of bytes per pixel row (at least 4 x WidthPixels).

public int Stride { get; }

Property Value

int

WidthPixels

The width of the image in pixels.

public int WidthPixels { get; }

Property Value

int

Methods

Dispose()

Releases the pixel buffer.

public void Dispose()