Share via


IPdfRenderService.CreatePage(Stream, Int32) Method

Definition

Creates a PDF page from the specified stream.

public Microsoft.Maui.Graphics.IPdfPage CreatePage(System.IO.Stream stream, int pageNumber = -1);
abstract member CreatePage : System.IO.Stream * int -> Microsoft.Maui.Graphics.IPdfPage
Public Function CreatePage (stream As Stream, Optional pageNumber As Integer = -1) As IPdfPage

Parameters

stream
Stream

The stream containing the PDF document.

pageNumber
Int32

The page number to create (negative values indicate the last page).

Returns

An IPdfPage object representing the specified page.

Exceptions

Thrown when stream is null.

Thrown when the stream does not contain a valid PDF document or the specified page doesn't exist.

Applies to