This class encapsulates rendering of document to PDF. More...
Inherits Device, Aspose::Page::IMultiPageDevice, and Aspose::Page::IStreamable.
Public Member Functions | |
int32_t | get_CurrentPageNumber () override |
Current page number. More... | |
void | set_Stroke (System::SharedPtr< System::Drawing::Pen > value) override |
Returns or specifies current stroke. More... | |
void | set_Paint (System::SharedPtr< System::Drawing::Brush > value) override |
Returns or specifies current paint. More... | |
System::SharedPtr< System::Drawing::Brush > | get_LastWrittenPaint () const |
Draws frame and banner around a string. The method calculates and returns the point to which the text curser should be set before drawing the string. More... | |
void | set_Font (System::SharedPtr< BaseTrFont > value) override |
Specifies current font. More... | |
System::String | get_WarningMessage () |
System::SharedPtr< System::IO::Stream > | get_OutputStream () override |
Specifies or returns an output stream. More... | |
void | set_OutputStream (System::SharedPtr< System::IO::Stream > value) override |
Specifies or returns an output stream. More... | |
PdfDevice (System::SharedPtr< System::IO::Stream > ros) | |
Initializes new instance of PdfDevice with output stream. More... | |
PdfDevice (System::SharedPtr< System::IO::Stream > ros, System::Drawing::Size size) | |
Initializes new instance of PdfDevice with output stream and specified size of a page. More... | |
void | ReNew () override |
Reset device to initial state for whole document. Used for reseting output stream. More... | |
void | ReNewForMerge (bool mainDocument) override |
Reset device to initial state for whole document while merging several documents. Used for reseting output stream. More... | |
PdfDevice (System::SharedPtr< PdfDevice > device, bool doRestoreOnDispose) | |
Clone constructor. Initializes new instance of PdfDevice with existing device. More... | |
void | StartDocument () override |
Makes necessary preparation of device before start rendering of document. More... | |
void | EndDocument () override |
Makes necessary preparation of device after the document has been rendered. More... | |
void | Dispose () override |
Disposes the graphics context. If on creation restoreOnDispose was true, writeGraphicsRestore() will be called. More... | |
void | WriteHeader () |
Writes the catalog, docinfo, preferences, and (as we use only single page output the page tree. More... | |
void | WriteBackground () override |
Writes out current background. More... | |
void | WriteTrailer () |
Writes out trailer of PDF document. More... | |
void | CloseStream () |
void | Reset () override |
If page device parameters will be set this method allows to return writing stream back the begining of page. More... | |
void | Reset (bool zeroPageNumbers) override |
void | InitPageNumbers () override |
Initializes numbers of pages to output. More... | |
bool | OpenPage (System::String title) override |
Makes necessary preparation of the device before page rendering. More... | |
bool | OpenPage (float width, float height) override |
Makes necessary preparation of the device before each page rendering. More... | |
void | ClosePage () override |
Makes necessary preparation of the device after page has been rendered. More... | |
virtual void | SavePageTransform () |
void | UpdatePageParameters (System::SharedPtr< IMultiPageDevice > device) override |
Updates page parameters from other multi-paged device. More... | |
virtual void | SetHeader (System::SharedPtr< Aspose::Page::EPS::Postscript::TrFont > font, System::SharedPtr< Aspose::Page::EPS::Graphics2d::TagString > left, System::SharedPtr< Aspose::Page::EPS::Graphics2d::TagString > center, System::SharedPtr< Aspose::Page::EPS::Graphics2d::TagString > right, int32_t underlineThickness) |
virtual void | SetFooter (System::SharedPtr< Aspose::Page::EPS::Postscript::TrFont > font, System::SharedPtr< Aspose::Page::EPS::Graphics2d::TagString > left, System::SharedPtr< Aspose::Page::EPS::Graphics2d::TagString > center, System::SharedPtr< Aspose::Page::EPS::Graphics2d::TagString > right, int32_t underlineThickness) |
void | SetSaveFromPatternCreate () |
System::SharedPtr< Aspose::Page::Device > | Create () override |
Creates a copy of this device. More... | |
virtual System::SharedPtr< Aspose::Page::Device > | Copy () |
virtual System::SharedPtr< Aspose::Page::Device > | Create (float x, float y, float width, float height) |
virtual void | WriteGraphicsSave () |
virtual void | WriteGraphicsRestore () |
void | InitClip () override |
Initializes clip of the device. More... | |
void | Draw (System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath > s) override |
Draws a path. More... | |
void | Fill (System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath > s) override |
Fills a path. More... | |
void | FillLastClip () |
void | DrawImage (System::SharedPtr< System::Drawing::Bitmap > image, System::SharedPtr< System::Drawing::Drawing2D::Matrix > transform, System::Drawing::Color bkg) override |
Draws an image with assigned transform and background. More... | |
void | DrawBitmapGlyph (System::SharedPtr< System::Object > charSelector, System::String fontName, System::SharedPtr< System::Drawing::Bitmap > image, System::SharedPtr< System::Drawing::Drawing2D::Matrix > transform) override |
void | DrawString (System::String str, double x, double y) override |
Draws a string at given point. More... | |
virtual void | WriteTransform (System::SharedPtr< System::Drawing::Drawing2D::Matrix > t) |
Write the given transformation matrix to the file. More... | |
System::SharedPtr< System::Drawing::Drawing2D::Matrix > | GetTransform () override |
Gets current transform. More... | |
void | SetTransform (System::SharedPtr< System::Drawing::Drawing2D::Matrix > transform) override |
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). More... | |
void | Transform (System::SharedPtr< System::Drawing::Drawing2D::Matrix > transform) override |
Transforms the current transformation matrix. Calls writeTransform(Transform) More... | |
void | Translate (double x, double y) override |
Translates the current transformation matrix. Calls writeTransform(Transform). More... | |
void | Rotate (double theta) override |
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. More... | |
void | Scale (double sx, double sy) override |
Scales the current transformation matrix. Calls writeTransform(Transform). More... | |
void | Shear (double shx, double shy) override |
Shears the current transformation matrix. Calls writeTransform(Transform). More... | |
void | SetClip (System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath > clipPath) override |
Specifies the clip of the device. More... | |
virtual void | WriteClip (System::Drawing::RectangleF r2d) |
virtual void | WriteClip (System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath > s) |
virtual void | ClipRect (float x, float y, float width, float height) |
Clips rectangle. Calls clip(Rectangle2D). More... | |
void | WriteWidth (float width) override |
Writes out the width of the stroke. More... | |
void | WriteCap (System::Drawing::Drawing2D::LineCap cap) override |
Writes out the cap of the stroke. More... | |
void | WriteJoin (System::Drawing::Drawing2D::LineJoin join) override |
Writes out the join of the stroke. More... | |
void | WriteMiterLimit (float limit) override |
Writes out the miter limit of the stroke. More... | |
void | WriteDash (System::ArrayPtr< double > dash, double phase, System::Drawing::Drawing2D::DashCap dashCap, float width) override |
Writes out the dash of the stroke. More... | |
void | WritePaint (System::SharedPtr< System::Drawing::SolidBrush > c) override |
Writes out paint as the given color. More... | |
void | WritePaint (System::SharedPtr< System::Drawing::Drawing2D::LinearGradientBrush > c) override |
Writes out paint as the given gradient. More... | |
void | WritePaint (System::SharedPtr< System::Drawing::TextureBrush > c) override |
Writes out paint as the given texture. More... | |
void | WritePaint (System::SharedPtr< System::Drawing::Brush > paint) override |
Writes out paint. More... | |
void | WriteLastWrittenPaint () |
Writes out last written paint. It is useful in cases when after writing paint graphics restore ("Q") was performed. More... | |
void | WriteComment (System::String comment) override |
Writes a comment. More... | |
virtual void | ResetClip (System::Drawing::Rectangle clip) |
virtual void | Clip (System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath > s) |
Clips using given shape. Dispatches to writeClip(Rectangle), writeClip(RectangleF) or writeClip(Shape). More... | |
void | WriteWarning (System::String warning) override |
Writes out a warning, by default to System.err. More... | |
void | WriteString (System::SharedPtr< BaseTrFont > font, System::String str) override |
Writes out string with specified font. More... | |
int64_t | GetFinalWrittenLength () override |
System::String | ToString () const override |
Returns the name of device type. More... | |
![]() | |
ASPOSECPP_SHARED_API | Object () |
Creates object. Initializes all internal data structures. More... | |
virtual ASPOSECPP_SHARED_API | ~Object () |
Destroys object. Frees all internal data structures. More... | |
ASPOSECPP_SHARED_API | Object (Object const &x) |
Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object & | operator= (Object const &x) |
Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object * | SharedRefAdded () |
Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | SharedRefRemovedSafe () |
Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | RemovedSharedRefs (int count) |
Decreases shared reference count by specified value. More... | |
Detail::SmartPtrCounter * | WeakRefAdded () |
Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
void | WeakRefRemoved () |
Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
Detail::SmartPtrCounter * | GetCounter () |
Gets reference counter data structure associated with the object. More... | |
int | SharedCount () const |
Gets current value of shared reference counter. More... | |
ASPOSECPP_SHARED_API void | Lock () |
Implements C# lock() statement locking. Call directly or use LockContext sentry object. More... | |
ASPOSECPP_SHARED_API void | Unlock () |
Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More... | |
virtual ASPOSECPP_SHARED_API bool | Equals (ptr obj) |
Compares objects using C# Object.Equals semantics. More... | |
virtual ASPOSECPP_SHARED_API int32_t | GetHashCode () const |
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More... | |
virtual ASPOSECPP_SHARED_API ptr | MemberwiseClone () const |
Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More... | |
virtual ASPOSECPP_SHARED_API const TypeInfo & | GetType () const |
Gets actual type of object. Analog of C# System.Object.GetType() call. More... | |
virtual ASPOSECPP_SHARED_API bool | Is (const TypeInfo &targetType) const |
Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More... | |
virtual ASPOSECPP_SHARED_API void | SetTemplateWeakPtr (uint32_t argument) |
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More... | |
virtual ASPOSECPP_SHARED_API bool | FastCast (const Details::FastRttiBase &helper, void **out_ptr) const |
For internal purposes only. More... | |
template<> | |
bool | Equals (float const &objA, float const &objB) |
template<> | |
bool | Equals (double const &objA, double const &objB) |
template<> | |
bool | ReferenceEquals (String const &str, std::nullptr_t) |
template<> | |
bool | ReferenceEquals (String const &str1, String const &str2) |
Static Public Member Functions | |
static System::String & | TRANSPARENT () |
"Transparent" property key. More... | |
static System::String & | BACKGROUND () |
"Background" property key. More... | |
static System::String & | BACKGROUND_COLOR () |
"Background color" property key. More... | |
static System::String & | PAGE_MARGINS () |
"Page margins" property key. More... | |
static System::String & | ORIENTATION () |
"Orientation" property key. More... | |
static System::String & | FIT_TO_PAGE () |
"Fit content to page" property key. More... | |
static System::String & | EMBED_FONTS () |
"Embed font in document" property key. More... | |
static System::String & | EMBED_FONTS_AS () |
"What font type is used for embedding" property key. More... | |
static System::String & | COMPRESS () |
"Compress" property key. More... | |
static System::String & | WRITE_IMAGES_AS () |
"Format of images" property key. More... | |
static System::String & | AUTHOR () |
"Author" property value. More... | |
static System::String & | TITLE () |
"Title" property value. More... | |
static System::String & | SUBJECT () |
"Subject" property value. More... | |
static System::String & | KEYWORDS () |
"Keywords" property value. More... | |
static System::String & | EMIT_WARNINGS () |
"Emit warnings" property value. More... | |
static System::String & | EMIT_ERRORS () |
"Emit errors" property value. More... | |
![]() | |
static bool | ReferenceEquals (ptr const &objA, ptr const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, T const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, std::nullptr_t) |
Reference-compares value type object with nullptr. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares reference type objects in C# style. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares value type objects in C# style. More... | |
static const TypeInfo & | Type () |
Implements C# typeof(System.Object) construct. More... | |
Static Public Attributes | |
static System::String | VERSION |
"Version" property key. More... | |
static const System::String | VERSION5 |
"Version of Adobe Acrobat Reader" property value. More... | |
static System::String | PAGE_SIZE_ |
"Page size" property key. More... | |
Protected Member Functions | |
virtual void | WriteGraphicsState () |
Called to write the initial graphics state. More... | |
virtual | ~PdfDevice () |
Protected Attributes | |
System::SharedPtr< System::Drawing::Drawing2D::Matrix > | currentTransform |
Current transform. More... | |
System::SharedPtr< System::Drawing::Drawing2D::Matrix > | everyPageTransform |
Transform that must be set on each page before adding any element (for multi-page documents). Used when some transforms are set before starting any page. More... | |
Static Protected Attributes | |
static const System::String | PDF_VERSION |
Device properties including metadata. More... | |
Additional Inherited Members | |
![]() | |
typedef SmartPtr< Object > | ptr |
Alias for smart pointer type. More... | |
This class encapsulates rendering of document to PDF.
Aspose::Page::EPS::Device::PdfDevice::PdfDevice | ( | System::SharedPtr< System::IO::Stream > | ros | ) |
Initializes new instance of PdfDevice with output stream.
ros | Output stream. |
Aspose::Page::EPS::Device::PdfDevice::PdfDevice | ( | System::SharedPtr< System::IO::Stream > | ros, |
System::Drawing::Size | size | ||
) |
Aspose::Page::EPS::Device::PdfDevice::PdfDevice | ( | System::SharedPtr< PdfDevice > | device, |
bool | doRestoreOnDispose | ||
) |
Clone constructor. Initializes new instance of PdfDevice with existing device.
device | Existing device. |
doRestoreOnDispose | Use true if need to write restoring graphics state on disposing. |
|
protectedvirtual |
|
static |
"Author" property value.
|
static |
"Background" property key.
|
static |
"Background color" property key.
|
virtual |
Clips using given shape. Dispatches to writeClip(Rectangle), writeClip(RectangleF) or writeClip(Shape).
shape | used for clipping |
|
virtual |
Clips rectangle. Calls clip(Rectangle2D).
x | , y, width, height rectangle for clipping |
|
overridevirtual |
Makes necessary preparation of the device after page has been rendered.
Implements Aspose::Page::IMultiPageDevice.
void Aspose::Page::EPS::Device::PdfDevice::CloseStream | ( | ) |
|
static |
"Compress" property key.
|
virtual |
|
override |
Creates a copy of this device.
|
virtual |
|
override |
Disposes the graphics context. If on creation restoreOnDispose was true, writeGraphicsRestore() will be called.
|
override |
Draws a path.
s | A path to be drawn. |
|
override |
|
override |
Draws an image with assigned transform and background.
image | An image to be drawn. |
transform | A transform. |
bkg | A background color. |
|
override |
Draws a string at given point.
str | A string to be drawn. |
x | X coordinate of point. |
y | Y coordinate of point. |
|
static |
"Embed font in document" property key.
|
static |
"What font type is used for embedding" property key.
|
static |
"Emit errors" property value.
|
static |
"Emit warnings" property value.
|
override |
Makes necessary preparation of device after the document has been rendered.
|
override |
Fills a path.
s | A path to be filled. |
void Aspose::Page::EPS::Device::PdfDevice::FillLastClip | ( | ) |
|
static |
"Fit content to page" property key.
|
overridevirtual |
Current page number.
Implements Aspose::Page::IMultiPageDevice.
System::SharedPtr<System::Drawing::Brush> Aspose::Page::EPS::Device::PdfDevice::get_LastWrittenPaint | ( | ) | const |
Draws frame and banner around a string. The method calculates and returns the point to which the text curser should be set before drawing the string.
|
overridevirtual |
Specifies or returns an output stream.
Implements Aspose::Page::IStreamable.
System::String Aspose::Page::EPS::Device::PdfDevice::get_WarningMessage | ( | ) |
|
override |
|
override |
Gets current transform.
|
override |
Initializes clip of the device.
|
overridevirtual |
Initializes numbers of pages to output.
Implements Aspose::Page::IMultiPageDevice.
|
static |
"Keywords" property value.
|
overridevirtual |
Makes necessary preparation of the device before page rendering.
title | The page title. |
Implements Aspose::Page::IMultiPageDevice.
|
overridevirtual |
Makes necessary preparation of the device before each page rendering.
width | A width of the page. |
height | A height of the page. |
Implements Aspose::Page::IMultiPageDevice.
|
static |
"Orientation" property key.
|
static |
"Page margins" property key.
|
override |
Reset device to initial state for whole document. Used for reseting output stream.
|
override |
Reset device to initial state for whole document while merging several documents. Used for reseting output stream.
|
override |
If page device parameters will be set this method allows to return writing stream back the begining of page.
|
override |
|
virtual |
|
override |
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.
theta | radians over which to rotate |
|
virtual |
|
override |
Scales the current transformation matrix. Calls writeTransform(Transform).
sx | A scale in X axis. |
sy | A scale in Y axis. |
|
override |
Specifies current font.
|
overridevirtual |
Specifies or returns an output stream.
Implements Aspose::Page::IStreamable.
|
override |
Returns or specifies current paint.
|
override |
Returns or specifies current stroke.
|
override |
Specifies the clip of the device.
clipPath | A clipping path. |
|
virtual |
|
virtual |
void Aspose::Page::EPS::Device::PdfDevice::SetSaveFromPatternCreate | ( | ) |
|
override |
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).
transform | Transform to be applied. |
|
override |
Shears the current transformation matrix. Calls writeTransform(Transform).
shx | A shear in X axis. |
shy | A shear in Y axis. |
|
override |
Makes necessary preparation of device before start rendering of document.
|
static |
"Subject" property value.
|
static |
"Title" property value.
|
overridevirtual |
|
override |
Transforms the current transformation matrix. Calls writeTransform(Transform)
transform | Transform to be applied. |
|
override |
Translates the current transformation matrix. Calls writeTransform(Transform).
x | Translation in X axis. |
y | Translation in Y axis. |
|
static |
"Transparent" property key.
|
overridevirtual |
Updates page parameters from other multi-paged device.
device | Another instance of the same device. |
Implements Aspose::Page::IMultiPageDevice.
|
static |
"Format of images" property key.
|
override |
Writes out current background.
|
override |
Writes out the cap of the stroke.
cap | Line cap of the stroke. |
|
virtual |
|
virtual |
|
override |
Writes a comment.
comment | A comment to be written. |
|
override |
Writes out the dash of the stroke.
dash | The dash pattern or an empty array if line is solid. |
phase | The phase of the dash pattern. |
dashCap | The dash cap of the dash pattern. |
|
virtual |
|
virtual |
|
protectedvirtual |
Called to write the initial graphics state.
void Aspose::Page::EPS::Device::PdfDevice::WriteHeader | ( | ) |
Writes the catalog, docinfo, preferences, and (as we use only single page output the page tree.
|
override |
Writes out the join of the stroke.
join | Line join of the stroke. |
void Aspose::Page::EPS::Device::PdfDevice::WriteLastWrittenPaint | ( | ) |
Writes out last written paint. It is useful in cases when after writing paint graphics restore ("Q") was performed.
paint | The paint to be written. |
|
override |
Writes out the miter limit of the stroke.
limit | Miter limit of the stroke. |
|
override |
Writes out paint as the given color.
c | The color to be written. |
|
override |
Writes out paint as the given gradient.
c | The paint to be written |
|
override |
Writes out paint as the given texture.
c | The paint to be written |
|
override |
Writes out paint.
paint | The paint to be written. |
|
override |
Writes out string with specified font.
font | Specified font. |
str | The string. |
void Aspose::Page::EPS::Device::PdfDevice::WriteTrailer | ( | ) |
Writes out trailer of PDF document.
|
virtual |
Write the given transformation matrix to the file.
|
override |
Writes out a warning, by default to System.err.
warning | The warning to be written. |
|
override |
Writes out the width of the stroke.
width | The width of the stroke |
|
protected |
Current transform.
|
protected |
Transform that must be set on each page before adding any element (for multi-page documents). Used when some transforms are set before starting any page.
|
static |
"Page size" property key.
|
staticprotected |
Device properties including metadata.
"PDF version" property value.
|
static |
"Version" property key.
|
static |
"Version of Adobe Acrobat Reader" property value.