Aspose::Page::EPS::Device::PdfDevice 类

PdfDevice class

此类封装文档渲染为 PDF 的过程。

class PdfDevice : public Aspose::Page::Device,
                  public Aspose::Page::IMultiPageDevice,
                  public Aspose::Page::IStreamable

方法

方法描述
static AUTHOR()"Author" 属性值。
static BACKGROUND()"Background" 属性键。
static BACKGROUND_COLOR()"Background color" 属性键。
virtual Clip(System::SharedPtr<System::Drawing::Drawing2D::GraphicsPath>)使用给定形状进行裁剪。分派到 writeClip(Rectangle)、writeClip(RectangleF) 或 writeClip(Shape)。
virtual ClipRect(float, float, float, float)裁剪矩形。调用 clip(Rectangle2D)。
ClosePage() override在页面渲染后进行设备的必要准备。
CloseStream()
static COMPRESS()"Compress" 属性键。
virtual Copy()
Create() override创建此设备的副本。
virtual Create(float, float, float, float)
CreatePdfCanvas()
Dispose() override释放图形上下文。如果在创建时 restoreOnDispose 为 true,将调用 writeGraphicsRestore()。
Draw(System::SharedPtr<System::Drawing::Drawing2D::GraphicsPath>) override绘制路径。
DrawBitmapGlyph(System::SharedPtr<System::Object>, System::String, System::SharedPtr<System::Drawing::Bitmap>, System::SharedPtr<System::Drawing::Drawing2D::Matrix>) override
DrawImage(System::SharedPtr<System::Drawing::Bitmap>, System::SharedPtr<System::Drawing::Drawing2D::Matrix>, System::Drawing::Color) override绘制带有指定变换和背景的图像。
DrawString(System::String, double, double) override在给定点绘制字符串。
static EMBED_FONTS()"Embed font in document" 属性键。
static EMBED_FONTS_AS()"What font type is used for embedding" 属性键。
static EMIT_ERRORS()"Emit errors" 属性值。
static EMIT_WARNINGS()"Emit warnings" 属性值。
EndDocument() override在文档渲染后进行设备的必要准备。
Fill(System::SharedPtr<System::Drawing::Drawing2D::GraphicsPath>) override填充路径。
FillLastClip()
static FIT_TO_PAGE()"Fit content to page" 属性键。
get_CurrentPageNumber() override当前页码。
get_LastWrittenPaint() const在字符串周围绘制框架和横幅。该方法计算并返回在绘制字符串之前应设置文本光标的位置点。
get_OutputStream() override指定或返回输出流。
get_WarningMessage()
GetFinalWrittenLength() override
GetTransform() override获取当前变换。
InitClip() override初始化设备的剪裁区域。
InitPageNumbers() override初始化要输出的页数。
static KEYWORDS()“Keywords"属性值。
OpenPage(System::String) override在页面渲染之前进行设备的必要准备。
OpenPage(float, float) override在每个页面渲染之前进行设备的必要准备。
static ORIENTATION()“Orientation"属性键。
static PAGE_MARGINS()“Page margins"属性键。
static PAGE_SIZE_()“Page size"属性键。
PdfDevice(System::SharedPtr<System::IO::Stream>)使用输出流初始化 PdfDevice 的新实例。
PdfDevice(System::SharedPtr<System::IO::Stream>, System::Drawing::Size)使用输出流和指定的页面大小初始化 PdfDevice 的新实例。
PdfDevice(System::SharedPtr<PdfDevice>, bool)克隆构造函数。使用现有设备初始化 PdfDevice 的新实例。
ReNew() override将设备重置为整个文档的初始状态。用于重置输出流。
ReNewForMerge(bool) override在合并多个文档时,将设备重置为整个文档的初始状态。用于重置输出流。
Reset() override如果页面设备参数已设置,此方法允许将写入流返回到页面的起始位置。
Reset(bool) override
virtual ResetClip(System::Drawing::Rectangle)
Rotate(double) override绕 Z 轴旋转当前变换。调用 writeTransform(Transform)。使用正角度 θ 旋转会将点从正 x 轴方向旋转到正 y 轴方向。
virtual SavePageTransform()
Scale(double, double) override缩放当前变换矩阵。调用 writeTransform(Transform)。
set_Font(System::SharedPtr<BaseTrFont>) override指定当前字体。
set_OutputStream(System::SharedPtr<System::IO::Stream>) override指定或返回输出流。
set_Paint(System::SharedPtr<System::Drawing::Brush>) override返回或指定当前画刷。
set_Stroke(System::SharedPtr<System::Drawing::Pen>) override返回或指定当前笔画。
SetClip(System::SharedPtr<System::Drawing::Drawing2D::GraphicsPath>) override指定设备的剪裁区域。
virtual SetFooter(System::SharedPtr<Postscript::TrFont>, System::SharedPtr<Graphics2d::TagString>, System::SharedPtr<Graphics2d::TagString>, System::SharedPtr<Graphics2d::TagString>, int32_t)
virtual SetHeader(System::SharedPtr<Postscript::TrFont>, System::SharedPtr<Graphics2d::TagString>, System::SharedPtr<Graphics2d::TagString>, System::SharedPtr<Graphics2d::TagString>, int32_t)
SetSaveFromPatternCreate()
SetTransform(System::SharedPtr<System::Drawing::Drawing2D::Matrix>) override指定当前变换。由于大多数输出格式不实现此功能,会计算 currentTransform 的逆变换并与要设置的变换相乘。然后通过调用 writeTransform(Transform) 将结果转发。
Shear(double, double) override对当前变换矩阵进行剪切。调用 writeTransform(Transform)。
StartDocument() override在开始渲染文档之前进行设备的必要准备。
static SUBJECT()“Subject"属性值。
static TITLE()“Title"属性值。
ToString() const override返回设备类型的名称。
Transform(System::SharedPtr<System::Drawing::Drawing2D::Matrix>) override变换当前的变换矩阵。调用 writeTransform(Transform)。
Translate(double, double) override平移当前的变换矩阵。调用 writeTransform(Transform)。
static TRANSPARENT()“Transparent” 属性键。
UpdatePageParameters(System::SharedPtr<IMultiPageDevice>) override从其他多页设备更新页面参数。
static WRITE_IMAGES_AS()“Format of images” 属性键。
WriteBackground() override写出当前背景。
WriteCap(System::Drawing::Drawing2D::LineCap) override写出笔画的端帽。
virtual WriteClip(System::Drawing::RectangleF)
virtual WriteClip(System::SharedPtr<System::Drawing::Drawing2D::GraphicsPath>)
WriteComment(System::String) override写入注释。
WriteDash(System::ArrayPtr<double>, double, System::Drawing::Drawing2D::DashCap, float) override写出笔画的虚线。
virtual WriteGraphicsRestore()
virtual WriteGraphicsSave()
WriteHeader()写出目录、文档信息、首选项,以及(因为我们仅使用单页输出)页面树。
WriteJoin(System::Drawing::Drawing2D::LineJoin) override写出笔画的连接方式。
WriteLastWrittenPaint()写出上一次写入的绘画。它在写入绘画后执行图形恢复(“Q”)的情况下很有用。
WriteMiterLimit(float) override写出笔画的斜接限制。
WritePaint(System::SharedPtr<System::Drawing::SolidBrush>) override将绘画写为指定颜色。
WritePaint(System::SharedPtr<System::Drawing::Drawing2D::LinearGradientBrush>) override将绘画写为指定渐变。
WritePaint(System::SharedPtr<System::Drawing::TextureBrush>) override将绘画写为指定纹理。
WritePaint(System::SharedPtr<System::Drawing::Brush>) override写出绘画。
WriteString(System::SharedPtr<BaseTrFont>, System::String) override使用指定字体写出字符串。
WriteTrailer()写出 PDF 文档的尾部。
virtual WriteTransform(System::SharedPtr<System::Drawing::Drawing2D::Matrix>)将给定的变换矩阵写入文件。
WriteWarning(System::String) override写出警告,默认输出到 System.err。
WriteWidth(float) override写出笔画的宽度。

字段

字段描述
static VERSION“Version” 属性键。
static VERSION5“Version of Adobe Acrobat Reader” 属性值。

Deprecated

PdfDevice 类自 24.3 起已弃用。请改用 PsDocument 类中的 SaveAsPdf 方法。24.6 版本中此类将被完全隐藏

另见