C#Word to PDF转换性能 [英] C# Word to PDF Conversion performance

查看:112
本文介绍了C#Word to PDF转换性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我能将Doc文件转换为PDF。

但我这样做的方式非常慢,这几乎无法使用。

我这样做的方式如下:



Hello,

im able to Convert a Doc file to PDF.
But the Way i am doing it is very slow, which makes it nearly unusable.
Im doing it the following way:

wordDocument = appWord.Documents.Open(path, ReadOnly: false, Visible: false);
wordDocument.ExportAsFixedFormat(System.IO.Path.ChangeExtension(path, ".PDF"), WdExportFormat.wdExportFormatPDF, false, WdExportOptimizeFor.wdExportOptimizeForOnScreen,
                                                                WdExportRange.wdExportAllDocument, 1, 1, WdExportItem.wdExportDocumentContent, true, true,
                                                                WdExportCreateBookmarks.wdExportCreateHeadingBookmarks, true, true, false, ref oMissing);
wordDocument.Close(SaveChanges: false);

推荐答案

没有办法加快速度。操作完全超出您的控制范围。



您可以尝试其他PDF库,例如CutePDF并将word文档打印为PDF文件,但是您可以我可能会遇到同样的问题。
There is no way to speed that up. The operation is completely out of your control.

You can TRY other PDF libraries, such as CutePDF and "printing" the word document to a PDF file, but you'll likely end up with the same problem.


这篇关于C#Word to PDF转换性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆