XPS ファイルのページ操作 | .NET

XPS ドキュメントへのページの追加

Aspose.Page for .NET は XpsDocument クラスを提供しており、このクラスは XPS ドキュメントにページを追加するための InsertPage メソッドを公開しています。 以下のコード スニペットは、XPS ドキュメントにページを追加するための完全な機能を示しています。

 1// Add page to XPS document.
 2
 3// Create new XPS Document
 4XpsDocument doc = new XpsDocument(DataDir + "Sample1.xps");
 5
 6string outputFileName = "AddPages_out.xps";
 7
 8// Insert an empty page at beginning of pages list
 9doc.InsertPage(1, true);
10
11// Save resultant XPS document
12doc.Save(OutputDir + outputFileName);
Example-AddPageXPS.cs hosted with ❤ by GitHub

Java および C++ の XPS ドキュメント内のページの操作を参照してください。

サンプルとデータ ファイルは GitHub からダウンロードできます。

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.