Free Support Forum - aspose.com

Pdf.setlicense

Hi,

When I compile the codes, then I get a following error message:

'SetLicense' is not a member of 'Aspose.Pdf.Pdf'.

This message is from this code line.
pdf.SetLicense(ConfigurationSettings.AppSettings("PdfLisens"), Me)

Someone can help me this problem!

Thank in advance

- Loi-

The codes following below:

--------------------------------------------------------------------------
Imports Aspose.Pdf

Public Class KontrollPDF

Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.

Private Sub InitializeComponent()

End Sub

'NOTE: The following placeholder declaration is required by the Web Form Designer.

'Do not delete or move it.

Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

'CODEGEN: This method call is required by the Web Form Designer

'Do not modify it using the code editor.

InitializeComponent()

End Sub

#End Region

Dim pdf As pdf

Dim dsKontroll As dsKontroll

Dim kontrollPK As Integer

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim path As String

Dim xmlFile As String

pdf = New pdf

Dim pdfPage As System.Web.UI.Page

pdfPage = New System.Web.UI.Page

pdf.SetLicense(ConfigurationSettings.AppSettings("PdfLisens"), Me)

path = MapPath(".")

path = path.Substring(0, path.LastIndexOf("\"))

xmlFile = path + "\\Xml\\KontrollSkjema.xml"

pdf.BindXML(xmlFile, Nothing)

kontrollPK = CInt(Session("KontrollPK"))

dsKontroll = Kontroll.HentKontroll(kontrollPK)

makeAnlegg() 'SPRINKLERANLEGGET (eier)

makeBygning() 'BYGNINGEN OG AKT?RENE

makeFGinfo() 'BYGNINGEN OG AKT?RENE

makeLagring() 'LAGRINGSKONFIGURASJON

makeSprinkler() 'SPRINKLERANLEGGET (teknisk)

makeVannforsyning() 'VANNFORSYNINGEN OG VANNMENGDE/TRYKKM?LING (P/Q)

makeGraph() 'PQ GRAF

makeForrigKontroll() 'FOREG?ENDE KONTROLL OG AVVIK I FORHOLD TIL DENNE

makeEndringer() 'BYGNINGSMESSIGE, BRUKSMESSIGE ELLER ANDRE ENDRINGER SIDEN SISTE KONTROLL

makeFunksjonalitet() 'FUNKSJONALITET, DRIFT OG VEDLIKEHOLD SIDEN SISTE KONTROLL

makeAnmerkninger() 'ANMERKNINGER, NYE FEIL ELLER MANGLER

makeKarakter() 'ANLEGGSKARAKTER

pdf.Save(Response)

Response.End()

End Sub

Dear ltanvo,

Thank you for choosing Aspose product.

The SetLicense is a static method. You should call it like the following:

Aspose.Pdf.Pdf.SetLicense(…);