XPSファイル内のページ操作 | Java

Contents
[ Hide Show ]

ページの追加

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

 1// For complete examples and data files, please go to https://github.com/aspose-page/Aspose.Page-for-Java
 2// The path to the documents directory.
 3String dataDir = Utils.getDataDir();
 4
 5// Create new XPS Document
 6XpsDocument doc = new XpsDocument(dataDir + "Aspose.xps");
 7
 8// Insert an empty page at beginning of pages list
 9doc.insertPage(1, true);
10
11// Save resultant XPS document
12doc.save(dataDir + "AddPages_out.xps");

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


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

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.