Aspose::Page::XPS::XpsDocument 类

XpsDocument class

封装了 XPS 文档的主要实体的类,提供对任何 XPS 元素的操作方法。

class XpsDocument : public Aspose::Page::Document,
                    public System::IDisposable

方法

方法描述
Add(T)添加一个内容元素(Canvas、Path 或 Glyphs)。
AddCanvas()向活动页面添加一个新画布。
AddDocument(bool)添加一个具有默认页面尺寸的空文档。
AddDocument(float, float, bool)添加一个空文档,其第一页尺寸为 widthheight
AddGlyphs(System::String, float, System::Drawing::FontStyle, float, float, System::String)向活动页面添加新的字形。
AddGlyphs(System::SharedPtr<XpsModel::XpsFont>, float, float, float, System::String)向活动页面添加新的字形。
AddOutlineEntry(System::String, int32_t, System::SharedPtr<XpsModel::XpsHyperlinkTarget>)向文档添加大纲条目。
AddPage(bool)向文档添加一个具有默认页面尺寸的空页。
AddPage(float, float, bool)向文档添加一个空页,指定 widthheight
AddPage(System::SharedPtr<XpsModel::XpsPage>, bool)向文档添加一页。
AddPath(System::SharedPtr<XpsModel::XpsPathGeometry>)向活动页面添加一条新路径。
Assert()
CreateArcSegment(System::Drawing::PointF, System::Drawing::SizeF, float, bool, XpsModel::XpsSweepDirection, bool)创建一个新的椭圆弧段。
CreateCanvas()创建一个新的 canvas。
CreateColor(System::Drawing::Color)创建一种新颜色。
CreateColor(int32_t, int32_t, int32_t, int32_t)在 sRGB 颜色空间中创建一种新颜色。
CreateColor(int32_t, int32_t, int32_t)在 sRGB 颜色空间中创建一种新颜色。
CreateColor(float, float, float, float)在 scRGB 颜色空间中创建一种新颜色。
CreateColor(float, float, float)在 scRGB 颜色空间中创建一种新颜色。
CreateColor(System::String, const System::ArrayPtr<float>&)在基于 ICC 的颜色空间中创建一种新颜色。
CreateColor(System::SharedPtr<XpsModel::XpsIccProfile>, const System::ArrayPtr<float>&)在基于 ICC 的颜色空间中创建一种新颜色。
CreateFont(System::String, System::Drawing::FontStyle)创建一个新的 TrueType 字体资源。
CreateFont(System::SharedPtr<System::IO::Stream>)从流创建一个新的 TrueType 字体资源。
CreateGlyphs(System::String, float, System::Drawing::FontStyle, float, float, System::String)创建新的 glyphs。
CreateGlyphs(System::SharedPtr<XpsModel::XpsFont>, float, float, float, System::String)创建新的 glyphs。
CreateGradientStop(System::SharedPtr<XpsModel::XpsColor>, float)创建一个新的渐变停止点。
CreateGradientStop(System::Drawing::Color, float)创建一个新的渐变停止点。
CreateIccProfile(System::String)从位于 iccProfilePath 的 ICC 配置文件创建一个新的 ICC 配置文件资源。
CreateIccProfile(System::SharedPtr<System::IO::Stream>)stream 创建一个新的 ICC 配置文件资源。
CreateImage(System::String)从位于 imagePath 的图像文件创建一个新的图像资源。
CreateImage(System::SharedPtr<System::IO::Stream>)stream 创建一个新的图像资源。
CreateImageBrush(System::SharedPtr<XpsModel::XpsImage>, System::Drawing::RectangleF, System::Drawing::RectangleF)创建一个新的图像画刷。
CreateImageBrush(System::String, System::Drawing::RectangleF, System::Drawing::RectangleF)创建一个新的图像画刷。
CreateLinearGradientBrush(System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<XpsModel::XpsGradientStop>>>, System::Drawing::PointF, System::Drawing::PointF)创建一个新的线性渐变画刷。
CreateLinearGradientBrush(System::Drawing::PointF, System::Drawing::PointF)创建一个新的线性渐变画刷。
CreateMatrix(float, float, float, float, float, float)创建一个新的仿射变换矩阵。
CreatePath(System::SharedPtr<XpsModel::XpsPathGeometry>)创建一个新的路径。
CreatePathFigure(System::Drawing::PointF, bool)创建一个新的路径图形。
CreatePathFigure(System::Drawing::PointF, System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<XpsModel::XpsPathSegment>>>, bool)创建一个新的路径图形。
CreatePathGeometry(System::String)创建一个使用简写形式指定的新的路径几何体。
CreatePathGeometry()创建一个新的路径几何体。
CreatePathGeometry(System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<XpsModel::XpsPathFigure>>>)创建一个包含指定路径图形列表的新的路径几何体。
CreatePolyBezierSegment(System::ArrayPtr<System::Drawing::PointF>, bool)创建一组新的三次贝塞尔曲线。
CreatePolyLineSegment(System::ArrayPtr<System::Drawing::PointF>, bool)创建一个包含任意数量独立顶点的新的多边形绘图。
CreatePolyQuadraticBezierSegment(System::ArrayPtr<System::Drawing::PointF>, bool)创建一组新的二次贝塞尔曲线,从路径图形中的前一点通过一组顶点,并使用指定的控制点。
CreateRadialGradientBrush(System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<XpsModel::XpsGradientStop>>>, System::Drawing::PointF, System::Drawing::PointF, float, float)创建一个新的径向渐变画刷。
CreateRadialGradientBrush(System::Drawing::PointF, System::Drawing::PointF, float, float)创建一个新的径向渐变画刷。
CreateSolidColorBrush(System::SharedPtr<XpsModel::XpsColor>)创建一个新的纯色画刷。
CreateSolidColorBrush(System::Drawing::Color)创建一个新的纯色画刷。
CreateVisualBrush(System::SharedPtr<XpsModel::XpsContentElement>, System::Drawing::RectangleF, System::Drawing::RectangleF)创建一个新的视觉画刷。
Dispose() override释放该实例。
get_ActiveDocument()获取活动文档的编号。
get_ActivePage()获取活动文档中活动页面的编号。
get_DocumentCount()返回 XPS 包中包含的文档数量。
get_JobPrintTicket()返回/设置文档的作业打印票据。
get_Page()返回活动页面的 XpsPage 实例。
get_PageCount()返回活动文档中的页数。
get_TotalPageCount()返回 XPS 文档中所有文档的页面总数。
get_Utils() const获取提供超出正式 XPS 操作 API 的实用功能的对象。
GetDocumentPrintTicket(int32_t)返回由 documentIndex 索引的文档的打印票据。
GetPagePrintTicket(int32_t, int32_t)返回在由 documentIndex 索引的文档中,由 pageIndex 索引的页面的打印票据。
Insert(int32_t, T)index 位置向活动页面插入一个元素(Canvas、Path 或 Glyphs)。
InsertCanvas(int32_t)index 位置向活动页面插入一个新 Canvas。
InsertDocument(int32_t, bool)index 位置插入一个具有默认页面尺寸的空文档。
InsertDocument(int32_t, float, float, bool)index 位置插入一个空文档,其首页尺寸为 widthheight
InsertGlyphs(int32_t, System::String, float, System::Drawing::FontStyle, float, float, System::String)index 位置向活动页面插入新的 Glyphs。
InsertGlyphs(int32_t, System::SharedPtr<XpsModel::XpsFont>, float, float, float, System::String)index 位置向活动页面插入新的 Glyphs。
InsertPage(int32_t, bool)index 位置向文档插入一个具有默认页面尺寸的空页面。
InsertPage(int32_t, float, float, bool)index 位置向文档插入一个具有指定 widthheight 的空页面。
InsertPage(int32_t, System::SharedPtr<XpsModel::XpsPage>, bool)index 位置向文档插入一个页面。
InsertPath(int32_t, System::SharedPtr<XpsModel::XpsPathGeometry>)index 位置向活动页面插入一个新 Path。
Merge(System::ArrayPtr<System::String>, System::String)将多个 XPS 文件合并为一个 XPS 文档。
Merge(System::ArrayPtr<System::String>, System::SharedPtr<System::IO::Stream>)将多个 XPS 文件合并为一个 XPS 文档。
MergeToPdf(System::ArrayPtr<System::String>, System::String, System::SharedPtr<Presentation::Pdf::PdfSaveOptions>)使用 Device 实例将 XPS 文档合并为 PDF。
MergeToPdf(System::ArrayPtr<System::String>, System::SharedPtr<System::IO::Stream>, System::SharedPtr<Presentation::Pdf::PdfSaveOptions>)使用 Device 实例将 XPS 文档合并为 PDF。
Remove(T)从活动页面移除一个元素。
RemoveAt(int32_t)从活动页面的 index 位置移除一个元素。
RemoveDocumentAt(int32_t)index 位置移除一个文档。
RemovePage(System::SharedPtr<XpsModel::XpsPage>)从文档中移除一个页面。
RemovePageAt(int32_t)index 位置从文档中移除一个页面。
Save(System::String)XPS 文档保存到位于 pathXPS 文件。
Save(System::SharedPtr<System::IO::Stream>)XPS 文档保存到流。
SaveAsImage(System::SharedPtr<Presentation::Image::ImageSaveOptions>)将文档保存为图像文件。输出目录和文件名将与输入的 XPS 文件相同。文件扩展名将对应于 “options” 参数中的图像格式。如果文档是使用非 FileStream 的流初始化的,图像文件将保存到当前文件夹,使用默认的文件名模板。
SaveAsImage(System::SharedPtr<Presentation::Image::ImageSaveOptions>, System::String, System::String)将文档保存为图像文件到指定目录,并使用指定的文件名。文件扩展名将对应于 “options” 参数中的图像格式。
SaveAsImageBytes(System::SharedPtr<Presentation::Image::ImageSaveOptions>)以位图图像格式将文档保存为字节数组。
SaveAsPdf(System::String, System::SharedPtr<Presentation::Pdf::PdfSaveOptions>)以 PDF 格式保存文档。
SaveAsPdf(System::SharedPtr<System::IO::Stream>, System::SharedPtr<Presentation::Pdf::PdfSaveOptions>)以 PDF 格式保存文档。
SaveAsPs(System::String, System::SharedPtr<EPS::Device::PsSaveOptions>)以 PS 格式保存文档。
SaveAsPs(System::SharedPtr<System::IO::Stream>, System::SharedPtr<EPS::Device::PsSaveOptions>)以 PS 格式保存文档。
SelectActiveDocument(int32_t)选择一个活动文档进行编辑。
SelectActivePage(int32_t)选择一个活动文档页面进行编辑。
set_JobPrintTicket(System::SharedPtr<Aspose::Page::XPS::XpsMetadata::JobPrintTicket>)返回/设置文档的作业打印票据。
SetDocumentPrintTicket(int32_t, System::SharedPtr<XpsMetadata::DocumentPrintTicket>)printTicket 链接到由 documentIndex 索引的文档。
SetPagePrintTicket(int32_t, int32_t, System::SharedPtr<XpsMetadata::PagePrintTicket>)printTicket 链接到由 pageIndex 索引的页面,该页面位于由 documentIndex 索引的文档中。
XpsDocument()创建空的 XPS 文档,使用默认页面大小。
XpsDocument(System::String)打开位于 path 的现有 XPS 文档。
XpsDocument(System::String, System::SharedPtr<LoadOptions>)将位于 path 的现有文档作为 XPS 文档打开。
XpsDocument(System::SharedPtr<System::IO::Stream>, System::SharedPtr<LoadOptions>)将存储在 stream 中的现有文档加载为 XPS 文档。

另见