Skip to content
How to verify offline license details?

How to verify offline license details?

You sometimes come across a situation where you are not sure if your license is valid/not expired. Or if you are using the latest license assigned to you. There are two ways to do this.

  1. Import a github.com/unidoc/unipdf/v4/common/license library, and run the following code with your key.
package main

import (
 "fmt"
 "github.com/unidoc/unipdf/v4/common/license"
)
const licenseKey = `
-----BEGIN UNIDOC LICENSE KEY-----
Your license key
-----END UNIDOC LICENSE KEY-----
`
func init() {
 err := license.SetLicenseKey(licenseKey, `Your Company Name`)
 if err != nil {
 panic(err)
 }
}
func main() {
 lk := license.GetLicenseKey()
 if lk == nil {
 fmt.Printf("Failed retrieving license key")
 return
 }
 fmt.Printf("%s\n", lk.ToString())
}
  1. Send your query with the license code to [email protected] if you are having any issues with your license validation.