Aspose.PDF (.Net版本)PDF转Word文件会有空白页面交替穿插

Aspose.PDF 使用授权Liscense后,pdf文档另存为其它格式文件,结果文件会有空白页面交替穿插在结果页面。不使用授权文件,导出没有问题。请问是什么原因?
示例文件(转换前后).zip (671.0 KB)

@uniqbarry

感谢您与支持人员联系。

请您分享源代码段,以便我们进一步调查。 但是,PDF文档中的格式和间距可能会插入空白页面,因为我们已经尝试使用MS Word2016,它也有这样的格式化探针。 MSword.zip

此外,在没有许可证文件的情况下存在一些限制,并且每个集合中只有4个项目可以仅作为4页PDF处理。

我们购买的授权文件好像是只允许有一台开发机,之前只有一台开发电脑使用授权文件没有这种情况,后来同事电脑上也部署了开发环境,在两个电脑上都运行后,就会出现交叉空白页面情况,是跟授权文件有关系吗?这种情况如何解决?

try
{
Document pdfDocument = new Document(path);
DocSaveOptions saveOptions = new DocSaveOptions();
saveOptions.Mode = DocSaveOptions.RecognitionMode.Flow;
string fileSaveName = savePath + “\” + Path.GetFileNameWithoutExtension(path);
if (convertType == “保持编辑”)
{
saveOptions.Mode = DocSaveOptions.RecognitionMode.Textbox;
}
if (saveType == “DOCX”)
{
saveOptions.Format = DocSaveOptions.DocFormat.DocX;
fileSaveName += “_out.docx”;
}
else
{
fileSaveName += “_out.doc”;
}
saveOptions.RelativeHorizontalProximity = 2.5f;
saveOptions.RecognizeBullets = true;
lock (objLock)
{
pdfDocument.Save(fileSaveName, saveOptions);
}
}
catch (Exception ex)
{ }

@uniqbarry

我们已经简化了您的代码并注意到最新版本的API不会出现问题。 附带生成的DOCX文件供您参考。Aspose.PDF_19.8.zip

因此,请尝试使用以下代码验证您的许可证:

try
{
    if (Aspose.Pdf.Document.IsLicensed)
    {
        Console.WriteLine("License set successfully.");
        Document pdfDocument = new Document(dataDir + "+¡-++-+¦.pdf");
        DocSaveOptions saveOptions = new DocSaveOptions();
        saveOptions.Mode = DocSaveOptions.RecognitionMode.Flow;
        saveOptions.Mode = DocSaveOptions.RecognitionMode.Textbox;
        saveOptions.Format = DocSaveOptions.DocFormat.DocX;
        saveOptions.RelativeHorizontalProximity = 2.5f;
        saveOptions.RecognizeBullets = true;
        pdfDocument.Save(dataDir + "Aspose.PDF_19.8.docx", saveOptions);
    }
    else {
        Console.WriteLine("License not set!");
    }
}
catch (Exception ex)
{
}

我们购买的授权文件是只允许有一台开发机,现在是有两台开发机在使用,导出word文件时候有时候都是正常的,有时候就会出现交叉空白页面情况,可以确定跟代码没关系,是跟授权文件有关系吗?

@uniqbarry

如果它与许可证文件相关,您可以使用Document.IsLicensed属性进行检查,如上所述。

我不是要判断是否有权限,而是要知道为什么会出现空白界面交替这种现象???明白不?

@uniqbarry

我们了解您的疑虑。 请让我们解释一下,只有当IsLicensed属性为false时,问题才与许可有关。

如果IsLicensed 属性为true,则问题与许可证无关。