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 library, github.com/unidoc/unipdf/v3/common/license, and run the following code with your key.

package main

import (
	"fmt"
	"github.com/unidoc/unipdf/v3/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())
}

2. Send your query with the license code to support@unidoc.io if you are having any issues with your license validation.