PdfRenderer Constructors

Definition

Overloads

PdfRenderer(ParcelFileDescriptor, LoadParams)

Creates a new instance of PdfRenderer class.

PdfRenderer(ParcelFileDescriptor)

Creates a new instance.

PdfRenderer(ParcelFileDescriptor, LoadParams)

Creates a new instance of PdfRenderer class.

[Android.Runtime.Register(".ctor", "(Landroid/os/ParcelFileDescriptor;Landroid/graphics/pdf/LoadParams;)V", "", ApiSince=35)]
public PdfRenderer (Android.OS.ParcelFileDescriptor fileDescriptor, Android.Graphics.Pdf.LoadParams params);
[<Android.Runtime.Register(".ctor", "(Landroid/os/ParcelFileDescriptor;Landroid/graphics/pdf/LoadParams;)V", "", ApiSince=35)>]
new Android.Graphics.Pdf.PdfRenderer : Android.OS.ParcelFileDescriptor * Android.Graphics.Pdf.LoadParams -> Android.Graphics.Pdf.PdfRenderer

Parameters

fileDescriptor
ParcelFileDescriptor

Seekable file descriptor to read from.

params
LoadParams

Instance of LoadParams specifying params for loading PDF document.

Attributes

Remarks

Creates a new instance of PdfRenderer class.

<strong>Note:</strong> The provided file descriptor must be <strong>seekable</strong>, i.e. its data being randomly accessed, e.g. pointing to a file. If the password passed in android.graphics.pdf.LoadParams is incorrect, the android.graphics.pdf.PdfRenderer will throw a SecurityException.

<strong>Note:</strong> This class takes ownership of the passed in file descriptor and is responsible for closing it when the renderer is closed.

If the file is from an untrusted source it is recommended to run the renderer in a separate, isolated process with minimal permissions to limit the impact of security exploits. <strong>Note:</strong> The constructor should be instantiated on the android.annotation.WorkerThread as it can be long-running while loading the document.

Java documentation for android.graphics.pdf.PdfRenderer.PdfRenderer(android.os.ParcelFileDescriptor, android.graphics.pdf.LoadParams).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

PdfRenderer(ParcelFileDescriptor)

Creates a new instance.

[Android.Runtime.Register(".ctor", "(Landroid/os/ParcelFileDescriptor;)V", "")]
public PdfRenderer (Android.OS.ParcelFileDescriptor input);
[Android.Runtime.Register(".ctor", "(Landroid/os/ParcelFileDescriptor;)V", "")]
public PdfRenderer (Android.OS.ParcelFileDescriptor fileDescriptor);
[<Android.Runtime.Register(".ctor", "(Landroid/os/ParcelFileDescriptor;)V", "")>]
new Android.Graphics.Pdf.PdfRenderer : Android.OS.ParcelFileDescriptor -> Android.Graphics.Pdf.PdfRenderer

Parameters

inputfileDescriptor
ParcelFileDescriptor

Seekable file descriptor to read from.

Attributes

Exceptions

If an error occurs while reading the file.

If the file requires a password or the security scheme is not supported.

Remarks

Creates a new instance.

<strong>Note:</strong> The provided file descriptor must be <strong>seekable</strong>, i.e. its data being randomly accessed, e.g. pointing to a file.

<strong>Note:</strong> This class takes ownership of the passed in file descriptor and is responsible for closing it when the renderer is closed.

If the file is from an untrusted source it is recommended to run the renderer in a separate, isolated process with minimal permissions to limit the impact of security exploits. <strong>Note:</strong> The constructor should be instantiated on the android.annotation.WorkerThread as it can be long-running while loading the document.

Java documentation for android.graphics.pdf.PdfRenderer.PdfRenderer(android.os.ParcelFileDescriptor).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to