用于 Publisher PUB 到 JPEG 转换的 C# 代码
using Aspose.Pub;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Data();
string fileName = dataDir + "halloween-flyer.pub";
var parser = PubFactory.CreateParser(fileName);
var doc = parser.Parse();
//Convert to jpg and save the result as file "halloween-flyer_out.jpg"
ConvertToFile(doc, PubExportFormats.Jpg, dataDir + "halloween-flyer_out.jpg");