Word文件转Pdf文件后1页变成了3页

你好,我在使用Aspose.Words(24.5.0)将一个word文件转为pdf时,word文件只有1页,生成的pdf文件却有3页,这是什么原因造成的,我应该怎么处理呢?
代码:

var wordPath = $@"D:\WorkPanel\conversion-demo\AsposeWord\source\FM20240430-bak.docx";
var pdfPath = $@"D:\WorkPanel\conversion-demo\AsposeWord\source\FM20240430-bak.pdf";
var doc = new Aspose.Words.Document(wordPath);
doc.Save(pdfPath);

word文件:


FM20240430-bak.docx (25.2 KB)

生成的PDF文件:


FM20240430-bak.pdf (32.1 KB)

@cqhg90258 该文档的呈现方式与 MS Word 中的呈现方式完全相同。 在Aspose.Words中,我们使用MS Word作为标准具。 但我可以看到您使用的是WPS Office,它以不同的方式呈现文档。

ms.pdf (88.9 KB) - MS Word
out.pdf (32.1 KB) - Aspose.Words
wps.pdf (55.2 KB) - WPS Office

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-26963

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like