vb.net 如何用新的替换旧的 aspose 许可证
How to replace a old aspose licence with a new one in vb.net
我们的产品是 Aspose.Words for .NET
我读过这个linkhttp://www.aspose.com/docs/display/wordsnet/Licensing
我们之前(由前开发人员)在我们的网络应用程序中实施了 aspose 许可证。
这是我们提取文档的代码。
Imports Aspose.Words
Imports System.IO
Public Class Converter
Public Shared Sub ConvertDocument(ByRef docPath As String, ByRef expPath As String)
Dim license As New Aspose.Words.License()
license.SetLicense("Aspose.Words.lic")
Dim info As Aspose.Words.FileFormatInfo = FileFormatUtil.DetectFileFormat(docPath)
Dim format As String = info.LoadFormat.ToString().ToLower()
If Not format = "pdf" Then
Dim doc As New Aspose.Words.Document(docPath)
doc.Save(expPath)
Else
' This object will help us generate the document.
Dim builder As New DocumentBuilder()
' You might need to specify a different encoding depending on your plain text files.
Using reader As New StreamReader(docPath, Encoding.UTF8)
' Read plain text "lines" and convert them into paragraphs in the document.
Dim line As String = Nothing
line = reader.ReadLine()
Do While line IsNot Nothing
builder.Writeln(line)
line = reader.ReadLine()
Loop
End Using
builder.Document.Save(expPath)
End If
End Sub
End Class
aspose 的所有设置已完成。在那之后我们的 aspose 许可证过期了,我们有一段时间没有升级它。然后又申请了30天的临时牌照
现在我们有了下一年的新许可证。我必须做什么才能申请新许可证。如果我只是用新的许可证文件 (Aspose.Words.lic)
替换旧的许可证文件 (Aspose.Words.lic) 可以吗
或者我是否还需要更改 Bin 文件夹内的 XML 文件 (Aspose.Words.xml) 中的任何内容。
您不需要更改 XML 文件或许可文件中的任何内容。如果您从文件中访问许可证,只需将旧文件替换为新文件即可。
如果您将许可证用作嵌入式资源,您可以删除现有资源,然后将新的许可证文件作为资源嵌入。
希望对您有所帮助。
披露:我在 Aspose 工作。
我们的产品是 Aspose.Words for .NET
我读过这个linkhttp://www.aspose.com/docs/display/wordsnet/Licensing
我们之前(由前开发人员)在我们的网络应用程序中实施了 aspose 许可证。
这是我们提取文档的代码。
Imports Aspose.Words
Imports System.IO
Public Class Converter
Public Shared Sub ConvertDocument(ByRef docPath As String, ByRef expPath As String)
Dim license As New Aspose.Words.License()
license.SetLicense("Aspose.Words.lic")
Dim info As Aspose.Words.FileFormatInfo = FileFormatUtil.DetectFileFormat(docPath)
Dim format As String = info.LoadFormat.ToString().ToLower()
If Not format = "pdf" Then
Dim doc As New Aspose.Words.Document(docPath)
doc.Save(expPath)
Else
' This object will help us generate the document.
Dim builder As New DocumentBuilder()
' You might need to specify a different encoding depending on your plain text files.
Using reader As New StreamReader(docPath, Encoding.UTF8)
' Read plain text "lines" and convert them into paragraphs in the document.
Dim line As String = Nothing
line = reader.ReadLine()
Do While line IsNot Nothing
builder.Writeln(line)
line = reader.ReadLine()
Loop
End Using
builder.Document.Save(expPath)
End If
End Sub
End Class
aspose 的所有设置已完成。在那之后我们的 aspose 许可证过期了,我们有一段时间没有升级它。然后又申请了30天的临时牌照
现在我们有了下一年的新许可证。我必须做什么才能申请新许可证。如果我只是用新的许可证文件 (Aspose.Words.lic)
替换旧的许可证文件 (Aspose.Words.lic) 可以吗或者我是否还需要更改 Bin 文件夹内的 XML 文件 (Aspose.Words.xml) 中的任何内容。
您不需要更改 XML 文件或许可文件中的任何内容。如果您从文件中访问许可证,只需将旧文件替换为新文件即可。
如果您将许可证用作嵌入式资源,您可以删除现有资源,然后将新的许可证文件作为资源嵌入。
希望对您有所帮助。
披露:我在 Aspose 工作。