out.zip (253.6 KB)
如题,转换完毕后一片空白,请查看附件,以下是我的代码
using (Aspose.Pdf.Document document = new Aspose.Pdf.Document(fileName))
{
Console.WriteLine("页数:" + document.Pages.Count());
string fileDir = Path.GetDirectoryName(fileName);
Aspose.Pdf.DocSaveOptions options = new Aspose.Pdf.DocSaveOptions();
options.RecognizeBullets = true;
options.AddReturnToLineEnd = true;
//options.TryMergeAdjacentSameBackgroundImages = false;
options.Mode = Aspose.Pdf.DocSaveOptions.RecognitionMode.Textbox;
options.Format = Aspose.Pdf.DocSaveOptions.DocFormat.DocX;
options.CustomProgressHandler = new Aspose.Pdf.UnifiedSaveOptions.ConversionProgressEventHandler(ShowProgressOnConsole);
document.Save(fileDir + "/out.docx", options);
document.FreeMemory();
document.Dispose();
}