Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save moh-abk/02b9d2839d630465816716bd07a5f7f8 to your computer and use it in GitHub Desktop.
Save moh-abk/02b9d2839d630465816716bd07a5f7f8 to your computer and use it in GitHub Desktop.
UniDoc/UniPDF and UniDoc/UniOffice license fix for development testing. To use in Production, get a license from unidoc.io.
===========================================================================================================================================
[Example Version: unidoc/unioffice@v1.5.1]
===========================================================================================================================================
1. In [GOPATH]/pkg/mod/github.com/unidoc/unioffice@v1.5.1/common/license/license.go, replace Public Key with the following key.
___________________________________________________________________________________________________________________________________________
New Public Key: "\u000a\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e\u0020\u0050\u0055\u0042\u004c\u0049\u0043\u0020\u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\u000a\u004d\u0049\u0049\u0042\u0049\u006a\u0041\u004e\u0042\u0067\u006b\u0071\u0068\u006b\u0069\u0047\u0039\u0077\u0030\u0042\u0041\u0051\u0045\u0046\u0041\u0041\u004f\u0043\u0041\u0051\u0038\u0041\u004d\u0049\u0049\u0042\u0043\u0067\u004b\u0043\u0041\u0051\u0045\u0041\u007a\u0054\u0079\u0041\u0056\u005a\u0030\u0078\u0065\u0037\u0078\u0067\u0057\u0054\u0063\u004a\u0053\u0036\u0033\u0063\u000a\u006b\u0050\u0055\u0034\u007a\u0066\u0062\u006d\u006a\u0044\u0032\u0043\u0079\u004e\u004f\u0042\u0059\u0033\u0031\u0078\u004f\u004c\u0045\u004a\u0049\u006d\u0067\u0052\u0034\u0064\u0036\u004b\u0045\u0066\u0054\u0070\u0057\u0074\u0036\u0074\u0046\u0051\u0049\u0064\u005a\u0055\u007a\u0030\u0076\u006c\u004d\u004d\u006b\u0068\u0046\u006d\u006d\u0076\u006f\u0061\u004b\u006a\u006e\u007a\u000a\u0079\u0030\u004f\u0065\u0042\u004d\u0058\u0070\u0053\u005a\u0070\u0057\u0049\u0063\u0041\u0073\u0078\u0049\u0062\u0054\u0045\u002f\u0032\u0069\u0037\u0079\u007a\u006c\u0062\u0048\u0039\u006d\u0035\u006d\u0038\u006e\u0049\u0057\u0070\u004b\u0049\u006a\u0058\u0042\u0056\u0056\u0032\u004e\u0033\u0058\u0031\u006d\u007a\u0079\u0062\u0052\u0059\u0054\u006a\u006b\u0063\u006c\u0073\u0067\u000a\u0044\u004f\u0043\u0047\u006d\u0032\u0075\u005a\u004e\u0075\u0064\u004f\u006c\u0037\u0064\u0031\u0030\u0034\u004d\u0035\u002b\u0077\u0030\u0036\u0063\u0031\u0037\u006d\u006a\u0055\u0049\u0043\u0076\u0077\u0051\u004a\u0070\u0048\u007a\u0056\u0064\u0050\u0031\u0069\u0036\u004e\u0069\u0031\u004a\u0031\u0063\u0044\u004f\u0034\u004d\u007a\u0043\u0072\u0059\u0057\u0062\u0054\u0036\u0049\u000a\u0067\u0075\u006e\u0073\u0043\u004d\u0062\u0077\u0039\u004c\u006e\u006b\u0068\u0034\u0079\u006a\u0030\u006a\u004b\u0049\u0075\u0048\u006e\u006c\u0065\u0030\u0041\u0035\u0041\u0074\u0038\u0033\u0078\u0077\u002b\u0049\u0049\u0036\u0062\u0073\u0069\u0052\u0035\u0052\u0053\u0038\u004c\u004c\u0071\u0070\u0071\u0043\u0031\u006a\u0069\u0038\u004d\u004f\u0038\u0037\u0073\u006a\u0065\u005a\u000a\u0053\u0050\u0034\u0059\u006d\u0074\u0037\u0042\u002f\u0065\u0033\u0078\u0053\u0070\u0076\u0077\u004f\u0054\u0057\u0069\u0074\u0036\u006d\u005a\u0075\u004f\u0034\u006d\u0055\u0074\u0074\u0079\u0037\u0065\u0068\u004d\u0043\u0035\u005a\u0037\u0078\u0054\u005a\u0049\u0064\u0069\u0065\u0069\u0030\u0053\u0035\u005a\u004e\u0072\u0065\u0050\u0030\u0058\u0062\u006b\u0067\u0073\u0064\u0048\u000a\u0031\u0077\u0049\u0044\u0041\u0051\u0041\u0042\u000a\u002d\u002d\u002d\u002d\u002d\u0045\u004e\u0044\u0020\u0050\u0055\u0042\u004c\u0049\u0043\u0020\u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\u000a";
NOTE: to find the constant to replace, search for \u002d\u002d\u002d\u002d\u002d\u0042
[Example]
const _bac = "\u000a\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e\u0020\u0050\u0055\u0042\u004c\u0049\u0043\u0020\u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\u000a\u004d\u0049\u0049\u0042\u0049\u006a\u0041\u004e\u0042\u0067\u006b\u0071\u0068\u006b\u0069\u0047\u0039\u0077\u0030\u0042\u0041\u0051\u0045\u0046\u0041\u0041\u004f\u0043\u0041\u0051\u0038\u0041\u004d\u0049\u0049\u0042\u0043\u0067\u004b\u0043\u0041\u0051\u0045\u0041\u007a\u0054\u0079\u0041\u0056\u005a\u0030\u0078\u0065\u0037\u0078\u0067\u0057\u0054\u0063\u004a\u0053\u0036\u0033\u0063\u000a\u006b\u0050\u0055\u0034\u007a\u0066\u0062\u006d\u006a\u0044\u0032\u0043\u0079\u004e\u004f\u0042\u0059\u0033\u0031\u0078\u004f\u004c\u0045\u004a\u0049\u006d\u0067\u0052\u0034\u0064\u0036\u004b\u0045\u0066\u0054\u0070\u0057\u0074\u0036\u0074\u0046\u0051\u0049\u0064\u005a\u0055\u007a\u0030\u0076\u006c\u004d\u004d\u006b\u0068\u0046\u006d\u006d\u0076\u006f\u0061\u004b\u006a\u006e\u007a\u000a\u0079\u0030\u004f\u0065\u0042\u004d\u0058\u0070\u0053\u005a\u0070\u0057\u0049\u0063\u0041\u0073\u0078\u0049\u0062\u0054\u0045\u002f\u0032\u0069\u0037\u0079\u007a\u006c\u0062\u0048\u0039\u006d\u0035\u006d\u0038\u006e\u0049\u0057\u0070\u004b\u0049\u006a\u0058\u0042\u0056\u0056\u0032\u004e\u0033\u0058\u0031\u006d\u007a\u0079\u0062\u0052\u0059\u0054\u006a\u006b\u0063\u006c\u0073\u0067\u000a\u0044\u004f\u0043\u0047\u006d\u0032\u0075\u005a\u004e\u0075\u0064\u004f\u006c\u0037\u0064\u0031\u0030\u0034\u004d\u0035\u002b\u0077\u0030\u0036\u0063\u0031\u0037\u006d\u006a\u0055\u0049\u0043\u0076\u0077\u0051\u004a\u0070\u0048\u007a\u0056\u0064\u0050\u0031\u0069\u0036\u004e\u0069\u0031\u004a\u0031\u0063\u0044\u004f\u0034\u004d\u007a\u0043\u0072\u0059\u0057\u0062\u0054\u0036\u0049\u000a\u0067\u0075\u006e\u0073\u0043\u004d\u0062\u0077\u0039\u004c\u006e\u006b\u0068\u0034\u0079\u006a\u0030\u006a\u004b\u0049\u0075\u0048\u006e\u006c\u0065\u0030\u0041\u0035\u0041\u0074\u0038\u0033\u0078\u0077\u002b\u0049\u0049\u0036\u0062\u0073\u0069\u0052\u0035\u0052\u0053\u0038\u004c\u004c\u0071\u0070\u0071\u0043\u0031\u006a\u0069\u0038\u004d\u004f\u0038\u0037\u0073\u006a\u0065\u005a\u000a\u0053\u0050\u0034\u0059\u006d\u0074\u0037\u0042\u002f\u0065\u0033\u0078\u0053\u0070\u0076\u0077\u004f\u0054\u0057\u0069\u0074\u0036\u006d\u005a\u0075\u004f\u0034\u006d\u0055\u0074\u0074\u0079\u0037\u0065\u0068\u004d\u0043\u0035\u005a\u0037\u0078\u0054\u005a\u0049\u0064\u0069\u0065\u0069\u0030\u0053\u0035\u005a\u004e\u0072\u0065\u0050\u0030\u0058\u0062\u006b\u0067\u0073\u0064\u0048\u000a\u0031\u0077\u0049\u0044\u0041\u0051\u0041\u0042\u000a\u002d\u002d\u002d\u002d\u002d\u0045\u004e\u0044\u0020\u0050\u0055\u0042\u004c\u0049\u0043\u0020\u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\u000a";
===========================================================================================================================================
2. Use the following license key (Customer Name: Acme). This business license is for both UniPDF and UniOffice - it will expire in 2099.
___________________________________________________________________________________________________________________________________________
-----BEGIN UNIDOC LICENSE KEY-----
eyJsaWNlbnNlX2lkIjoiTElELTEyMzQ1Njc4OTAiLCJjdXN0b21lcl9pZCI6IkNJRC0xMjM0NTY3ODkwIiwiY3VzdG9tZXJfbmFtZSI6IkFjbWUiLCJ0aWVyIjoiYnVzaW5lc3MiLCJjcmVhdGVkX2F0IjoxNTc3ODgwNzMyLCJleHBpcmVzX2F0Ijo0MTAwNzc4NzMyLCJjcmVhdG9yX25hbWUiOiJBY21lIiwiY3JlYXRvcl9lbWFpbCI6ImluZm9AYWNtZS5iaXoiLCJ1bmlwZGYiOnRydWUsInVuaW9mZmljZSI6dHJ1ZSwidHJpYWwiOmZhbHNlfQ==
+
W0CsnWBBcxCJBzyog+LG1zgzNiFSA3giSh6ewlFEWhxnYX6QfXl0IoCRaxwavGbtaQNges2Ouxi5EF3ijTnxfiM5ZENdUYsi23rPZWQfwH8Tj/yY0B2uNdzjnqPcssJ02Y+/LWPXQXR5BzL0lYzhXN9B39QkQVpVcH9VQGC3ks4ECCM0X4naWAMQb4FcUvlbfaYdGzbINNQNRVhHnaSTB49gJ/URDFWOwyMwB46kwjK5skViwIEoSVzXT0Bv0+J65Pc3xcqICfXM149XYg7HUAnBzDcYCeD/zL9QqoeUU2oL5cWYocJRks7KGCFz5WsZ3V7hOre+PasTb3v3MBZRZQ==
-----END UNIDOC LICENSE KEY-----
===========================================================================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment