PdfDevice

PdfDevice class

This class encapsulates rendering of document to PDF.

public class PdfDevice : Device, IMultiPageDevice, IStreamable

Constructors

Name Description
PdfDevice(Stream) Initializes new instance of PdfDevice with output stream.
PdfDevice(Stream, Size) Initializes new instance of PdfDevice with output stream and specified size of a page.

Properties

Name Description
virtual Background { get; set; } Returns or specifies current background of the page.
virtual CharTM { get; set; } Returns or specifies current characters transform.
Creator { get; set; } Returns or specifies creator of resulting device output.
virtual CurrentPageNumber { get; } Current page number.
override Font { set; } Specifies current font.
virtual IsDirectRGB { get; } Indicates whether device uses direct RGB mode, that is RGB.
IsLicensed { get; } Indicates whether this instance of Aspose.Page library is licensed.
virtual Opacity { get; set; } Returns or specifies current opacity.
virtual OpacityMask { get; set; } Returns or specifies current opacity mask.
OutputStream { get; set; } Specifies or returns an output stream.
override Paint { set; } Returns or specifies current paint.
Properties { get; set; } Device properties including metadata.
virtual SaveOptions { set; } Options for managing rendering process.
virtual Size { get; set; } Returns or specifies a size of the page.
override Stroke { set; } Returns or specifies current stroke.
virtual TextRenderingMode { get; set; } Returns or specifies current text rendering mode.
virtual TextStrokeWidth { get; set; } Returns or specifies current text stroke width.

Methods

Name Description
virtual ClosePage() Makes necessary preparation of the device after page has been rendered.
override Create() Creates a copy of this device.
override Dispose() Disposes the graphics context. If on creation restoreOnDispose was true, writeGraphicsRestore() will be called.
override Draw(GraphicsPath) Draws a path.
virtual DrawArc(double, double, double, double, double, double) Draws an arc.
override DrawImage(Bitmap, Matrix, Color) Draws an image with assigned transform and background.
virtual DrawLine(double, double, double, double) Draws a line segment.
virtual DrawOval(double, double, double, double) Draws an oval.
virtual DrawPolygon(double[], double[], int) Draws a poligone.
virtual DrawPolygon(int[], int[], int) Draws a polygon.
virtual DrawPolyline(double[], double[], int) Draws a polyline.
virtual DrawPolyline(int[], int[], int) Draws a polyline.
virtual DrawRect(double, double, double, double) Draws a rectangle.
virtual DrawRoundRect(double, double, double, double, double, double) Draws a round rectangle.
override DrawString(string, double, double) Draws a string at given point.
override EndDocument() Makes necessary preparation of device after the document has been rendered.
override Fill(GraphicsPath) Fills a path.
virtual FillArc(double, double, double, double, double, double) Fills an arc.
virtual FillOval(double, double, double, double) Fills an oval.
virtual FillPolygon(double[], double[], int) Fills a poligone.
virtual FillPolygon(int[], int[], int) Fills a poligone.
virtual FillRect(double, double, double, double) Fills a rectangle.
virtual FillRoundRect(double, double, double, double, double, double) Fills a round rectangle.
GetProperty(string) Gets a value of string property.
GetPropertyColor(string) Gets a value of color property.
GetPropertyDouble(string) Gets a value of double property.
GetPropertyInt(string) Gets a value of integer property.
GetPropertyMargins(string) Gets a value of margin property.
GetPropertyRectangle(string) Gets a value of rectangle property.
GetPropertySize(string) Gets a value of size property.
override GetTransform() Gets current transform.
override InitClip() Initializes clip of the device.
virtual InitPageNumbers() Initializes numbers of pages to output.
IsProperty(string) Gets a value of boolean property.
virtual OpenPage(string) Makes necessary preparation of the device before page rendering.
virtual OpenPage(float, float) Makes necessary preparation of the device before each page rendering.
override ReNew() Reset device to initial state for whole document. Used for reseting output stream.
override Reset() If page device parameters will be set this method allows to return writing stream back the begining of page.
override Rotate(double) Rotate the current transform over the Z-axis. Calls writeTransform(Transform). Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
virtual Rotate(double, double, double) Rotate the current transformation matrix around a point.
override Scale(double, double) Scales the current transformation matrix. Calls writeTransform(Transform).
override SetClip(GraphicsPath) Specifies the clip of the device.
override SetTransform(Matrix) Specifies the current transform. Since most output formats do not implement this functionality, the inverse transform of the currentTransform is calculated and multiplied by the transform to be set.The result is then forwarded by a call to writeTransform(Transform).
override Shear(double, double) Shears the current transformation matrix. Calls writeTransform(Transform).
override StartDocument() Makes necessary preparation of device before start rendering of document.
override ToString() Returns the name of device type.
override Transform(Matrix) Transforms the current transformation matrix. Calls writeTransform(Transform)
override Translate(double, double) Translates the current transformation matrix. Calls writeTransform(Transform).
virtual UpdatePageParameters(IMultiPageDevice) Updates page parameters from other multi-paged device.
override WriteComment(string) Writes a comment.

Fields

Name Description
static readonly AUTHOR “Author” property value.
static readonly BACKGROUND “Background” property key.
static readonly BACKGROUND_COLOR “Background color” property key.
static readonly COMPRESS “Compress” property key.
static readonly EMBED_FONTS “Embed font in document” property key.
static readonly EMBED_FONTS_AS “What font type is used for embedding” property key.
static readonly EMIT_ERRORS “Emit errors” property value.
static readonly EMIT_WARNINGS “Emit warnings” property value.
static readonly FIT_TO_PAGE “Fit content to page” property key.
static readonly KEYWORDS “Keywords” property value.
static readonly ORIENTATION “Orientation” property key.
static readonly PAGE_MARGINS “Page margins” property key.
static readonly PAGE_SIZE “Page size” property key.
static readonly SUBJECT “Subject” property value.
static readonly TITLE “Title” property value.
static readonly TRANSPARENT “Transparent” property key.
static readonly VERSION “Version” property key.
const VERSION5 “Version of Adobe Acrobat Reader” property value.
static readonly WRITE_IMAGES_AS “Format of images” property key.

See Also