0

我们的产品是 Aspose.Words for .NET

我已阅读此链接http://www.aspose.com/docs/display/wordsnet/Licensing

我们之前(由前开发人员)在我们的 Web 应用程序中实现了 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) 中的任何内容。

4

1 回答 1

2

You do not need to change anything in XML file or license file. If you're accessing the license from a file, you can simply replace the old file with the new one.

If you're using the license as an embedded resource, you can remove existing resource and then embed the new license file as a resource.

I hope this helps.

Disclosure: I work at Aspose.

于 2016-06-16T18:09:10.640 回答