本文介绍了转换ms word文档pdf问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。,



我使用此代码将word文档转换为pdf。此代码在本地系统中有效但在服务器Windows Server 2008中无效。

有人可以帮忙吗?



Dim abcDoc As WebSupergoo.ABCpdf7.Doc = Nothing



尝试

abcDoc =新的WebSupergoo.ABCpdf7.Doc()



Dim xro As New WebSupergoo.ABCpdf7.XReadOptions()

xro.FileExtension = fileExt



试试

abcDoc.Read(inputFile,xro)

Catch ex As Exception

System.Diagnostics.Trace.Write(ex.ToString())

抛出ex

结束尝试



Dim fileBytes As Byte()= abcDoc.GetData()

返回fileBytes

最后

如果不是abcDoc则没有那么

abcDoc.Clear()

abcDoc.Dispose()

结束如果

结束尝试

解方案


Hi .,

I am using this code for converting word document to pdf. this code works in local system but it is not working in server windows server 2008 .
Can anyone help on this ?

Dim abcDoc As WebSupergoo.ABCpdf7.Doc = Nothing

Try
abcDoc = New WebSupergoo.ABCpdf7.Doc()

Dim xro As New WebSupergoo.ABCpdf7.XReadOptions()
xro.FileExtension = fileExt

Try
abcDoc.Read(inputFile, xro)
Catch ex As Exception
System.Diagnostics.Trace.Write(ex.ToString())
Throw ex
End Try

Dim fileBytes As Byte() = abcDoc.GetData()
Return fileBytes
Finally
If Not abcDoc Is Nothing Then
abcDoc.Clear()
abcDoc.Dispose()
End If
End Try

解决方案


这篇关于转换ms word文档pdf问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-31 19:02