Skip to content

Commit

Permalink
Merge pull request #571 from unidoc-build/prep-rc-v3.63.0
Browse files Browse the repository at this point in the history
Release v3.63.0
  • Loading branch information
gunnsth authored Oct 22, 2024
2 parents 59238b1 + 033f762 commit 353e1d7
Show file tree
Hide file tree
Showing 62 changed files with 16,643 additions and 16,084 deletions.
954 changes: 478 additions & 476 deletions annotator/annotator.go

Large diffs are not rendered by default.

114 changes: 57 additions & 57 deletions common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,100 +10,100 @@
// terms that can be accessed at https://unidoc.io/eula/

// Package common contains common properties used by the subpackages.
package common ;import (_bd "fmt";_bc "io";_cb "os";_c "path/filepath";_fc "runtime";_f "time";);
package common ;import (_a "fmt";_e "io";_b "os";_cb "path/filepath";_ad "runtime";_g "time";);const _bde =10;

// WriterLogger is the logger that writes data to the Output writer
type WriterLogger struct{LogLevel LogLevel ;Output _bc .Writer ;};const _fbe =15;
type WriterLogger struct{LogLevel LogLevel ;Output _e .Writer ;};

// Trace does nothing for dummy logger.
func (DummyLogger )Trace (format string ,args ...interface{}){};var Log Logger =DummyLogger {};
// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_db ConsoleLogger )IsLogLevel (level LogLevel )bool {return _db .LogLevel >=level };

// Warning logs warning message.
func (_ef ConsoleLogger )Warning (format string ,args ...interface{}){if _ef .LogLevel >=LogLevelWarning {_fd :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ef .output (_cb .Stdout ,_fd ,format ,args ...);};};
// Error does nothing for dummy logger.
func (DummyLogger )Error (format string ,args ...interface{}){};

// Error logs error message.
func (_dd ConsoleLogger )Error (format string ,args ...interface{}){if _dd .LogLevel >=LogLevelError {_agb :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_dd .output (_cb .Stdout ,_agb ,format ,args ...);};};func (_ab ConsoleLogger )output (_cdb _bc .Writer ,_cg string ,_ece string ,_ga ...interface{}){_bce (_cdb ,_cg ,_ece ,_ga ...);
};
// Info logs info message.
func (_gd ConsoleLogger )Info (format string ,args ...interface{}){if _gd .LogLevel >=LogLevelInfo {_ebg :="\u005bI\u004e\u0046\u004f\u005d\u0020";_gd .output (_b .Stdout ,_ebg ,format ,args ...);};};

// Debug logs debug message.
func (_ae WriterLogger )Debug (format string ,args ...interface{}){if _ae .LogLevel >=LogLevelDebug {_efc :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_ae .logToWriter (_ae .Output ,_efc ,format ,args ...);};};const _eb =14;const _ad =2024;
// NewWriterLogger creates new 'writer' logger.
func NewWriterLogger (logLevel LogLevel ,writer _e .Writer )*WriterLogger {_ff :=WriterLogger {Output :writer ,LogLevel :logLevel };return &_ff ;};

// Trace logs trace message.
func (_age ConsoleLogger )Trace (format string ,args ...interface{}){if _age .LogLevel >=LogLevelTrace {_gd :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_age .output (_cb .Stdout ,_gd ,format ,args ...);};};const _egg =9;
// Warning logs warning message.
func (_ce ConsoleLogger )Warning (format string ,args ...interface{}){if _ce .LogLevel >=LogLevelWarning {_cg :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ce .output (_b .Stdout ,_cg ,format ,args ...);};};func _dbd (_fec _e .Writer ,_gab string ,_dfb string ,_bgff ...interface{}){_ ,_faf ,_dg ,_dcf :=_ad .Caller (3);
if !_dcf {_faf ="\u003f\u003f\u003f";_dg =0;}else {_faf =_cb .Base (_faf );};_abe :=_a .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_gab ,_faf ,_dg )+_dfb +"\u000a";_a .Fprintf (_fec ,_abe ,_bgff ...);};

// Notice does nothing for dummy logger.
func (DummyLogger )Notice (format string ,args ...interface{}){};const Version ="\u0033\u002e\u0036\u0032\u002e\u0030";
// Debug logs debug message.
func (_gge WriterLogger )Debug (format string ,args ...interface{}){if _gge .LogLevel >=LogLevelDebug {_gbe :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_gge .logToWriter (_gge .Output ,_gbe ,format ,args ...);};};

// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_da ConsoleLogger )IsLogLevel (level LogLevel )bool {return _da .LogLevel >=level };
// Error logs error message.
func (_baf WriterLogger )Error (format string ,args ...interface{}){if _baf .LogLevel >=LogLevelError {_bgf :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_baf .logToWriter (_baf .Output ,_bgf ,format ,args ...);};};const _dcff ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";

// Debug does nothing for dummy logger.
func (DummyLogger )Debug (format string ,args ...interface{}){};

// ConsoleLogger is a logger that writes logs to the 'os.Stdout'
type ConsoleLogger struct{LogLevel LogLevel ;};
type ConsoleLogger struct{LogLevel LogLevel ;};func (_gda WriterLogger )logToWriter (_cad _e .Writer ,_aa string ,_bfg string ,_ga ...interface{}){_dbd (_cad ,_aa ,_bfg ,_ga );};

// Info logs info message.
func (_cdc WriterLogger )Info (format string ,args ...interface{}){if _cdc .LogLevel >=LogLevelInfo {_egd :="\u005bI\u004e\u0046\u004f\u005d\u0020";_cdc .logToWriter (_cdc .Output ,_egd ,format ,args ...);};};
// Error logs error message.
func (_bg ConsoleLogger )Error (format string ,args ...interface{}){if _bg .LogLevel >=LogLevelError {_eb :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_bg .output (_b .Stdout ,_eb ,format ,args ...);};};

// Error does nothing for dummy logger.
func (DummyLogger )Error (format string ,args ...interface{}){};
// Info does nothing for dummy logger.
func (DummyLogger )Info (format string ,args ...interface{}){};

// Error logs error message.
func (_fa WriterLogger )Error (format string ,args ...interface{}){if _fa .LogLevel >=LogLevelError {_bdc :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_fa .logToWriter (_fa .Output ,_bdc ,format ,args ...);};};
// Notice logs notice message.
func (_fb ConsoleLogger )Notice (format string ,args ...interface{}){if _fb .LogLevel >=LogLevelNotice {_fa :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_fb .output (_b .Stdout ,_fa ,format ,args ...);};};

// Logger is the interface used for logging in the unipdf package.
type Logger interface{Error (_cbb string ,_e ...interface{});Warning (_fg string ,_fgd ...interface{});Notice (_fe string ,_bdf ...interface{});Info (_d string ,_eg ...interface{});Debug (_a string ,_ec ...interface{});Trace (_db string ,_ag ...interface{});
IsLogLevel (_cd LogLevel )bool ;};
type Logger interface{Error (_d string ,_ec ...interface{});Warning (_ee string ,_ge ...interface{});Notice (_gb string ,_f ...interface{});Info (_bb string ,_dc ...interface{});Debug (_ba string ,_ed ...interface{});Trace (_fd string ,_bc ...interface{});
IsLogLevel (_df LogLevel )bool ;};

// Warning logs warning message.
func (_fed WriterLogger )Warning (format string ,args ...interface{}){if _fed .LogLevel >=LogLevelWarning {_ca :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_fed .logToWriter (_fed .Output ,_ca ,format ,args ...);};};const _cgc =15;

// SetLogger sets 'logger' to be used by the unidoc unipdf library.
func SetLogger (logger Logger ){Log =logger };var Log Logger =DummyLogger {};

// Info logs info message.
func (_ed ConsoleLogger )Info (format string ,args ...interface{}){if _ed .LogLevel >=LogLevelInfo {_fef :="\u005bI\u004e\u0046\u004f\u005d\u0020";_ed .output (_cb .Stdout ,_fef ,format ,args ...);};};
func (_bcc WriterLogger )Info (format string ,args ...interface{}){if _bcc .LogLevel >=LogLevelInfo {_cf :="\u005bI\u004e\u0046\u004f\u005d\u0020";_bcc .logToWriter (_bcc .Output ,_cf ,format ,args ...);};};

// UtcTimeFormat returns a formatted string describing a UTC timestamp.
func UtcTimeFormat (t _f .Time )string {return t .Format (_bbfb )+"\u0020\u0055\u0054\u0043"};
// Trace logs trace message.
func (_cge WriterLogger )Trace (format string ,args ...interface{}){if _cge .LogLevel >=LogLevelTrace {_ebgg :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_cge .logToWriter (_cge .Output ,_ebgg ,format ,args ...);};};const _aaf =30;

// Debug logs debug message.
func (_ba ConsoleLogger )Debug (format string ,args ...interface{}){if _ba .LogLevel >=LogLevelDebug {_gc :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_ba .output (_cb .Stdout ,_gc ,format ,args ...);};};
// UtcTimeFormat returns a formatted string describing a UTC timestamp.
func UtcTimeFormat (t _g .Time )string {return t .Format (_dcff )+"\u0020\u0055\u0054\u0043"};const (LogLevelTrace LogLevel =5;LogLevelDebug LogLevel =4;LogLevelInfo LogLevel =3;LogLevelNotice LogLevel =2;LogLevelWarning LogLevel =1;LogLevelError LogLevel =0;
);

// NewConsoleLogger creates new console logger.
func NewConsoleLogger (logLevel LogLevel )*ConsoleLogger {return &ConsoleLogger {LogLevel :logLevel }};
// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};const _cc =21;

// IsLogLevel returns true from dummy logger.
func (DummyLogger )IsLogLevel (level LogLevel )bool {return true };

// Notice logs notice message.
func (_gdf WriterLogger )Notice (format string ,args ...interface{}){if _gdf .LogLevel >=LogLevelNotice {_dg :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_gdf .logToWriter (_gdf .Output ,_dg ,format ,args ...);};};
// Trace does nothing for dummy logger.
func (DummyLogger )Trace (format string ,args ...interface{}){};

// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_efa WriterLogger )IsLogLevel (level LogLevel )bool {return _efa .LogLevel >=level };func (_gg WriterLogger )logToWriter (_cf _bc .Writer ,_gb string ,_be string ,_dab ...interface{}){_bce (_cf ,_gb ,_be ,_dab );};var ReleasedAt =_f .Date (_ad ,_egg ,_eb ,_fbe ,_gbf ,0,0,_f .UTC );
const _bbfb ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";
// Notice does nothing for dummy logger.
func (DummyLogger )Notice (format string ,args ...interface{}){};const _fbg =2024;

// Notice logs notice message.
func (_fec ConsoleLogger )Notice (format string ,args ...interface{}){if _fec .LogLevel >=LogLevelNotice {_g :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_fec .output (_cb .Stdout ,_g ,format ,args ...);};};
func (_dd WriterLogger )Notice (format string ,args ...interface{}){if _dd .LogLevel >=LogLevelNotice {_geb :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_dd .logToWriter (_dd .Output ,_geb ,format ,args ...);};};

// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};const (LogLevelTrace LogLevel =5;LogLevelDebug LogLevel =4;LogLevelInfo LogLevel =3;LogLevelNotice LogLevel =2;LogLevelWarning LogLevel =1;LogLevelError LogLevel =0;);
// NewConsoleLogger creates new console logger.
func NewConsoleLogger (logLevel LogLevel )*ConsoleLogger {return &ConsoleLogger {LogLevel :logLevel }};func (_feg ConsoleLogger )output (_bd _e .Writer ,_bba string ,_bf string ,_ab ...interface{}){_dbd (_bd ,_bba ,_bf ,_ab ...);};

// LogLevel is the verbosity level for logging.
type LogLevel int ;

// SetLogger sets 'logger' to be used by the unidoc unipdf library.
func SetLogger (logger Logger ){Log =logger };

// DummyLogger does nothing.
type DummyLogger struct{};

// NewWriterLogger creates new 'writer' logger.
func NewWriterLogger (logLevel LogLevel ,writer _bc .Writer )*WriterLogger {_ff :=WriterLogger {Output :writer ,LogLevel :logLevel };return &_ff ;};

// Warning logs warning message.
func (_bb WriterLogger )Warning (format string ,args ...interface{}){if _bb .LogLevel >=LogLevelWarning {_bg :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_bb .logToWriter (_bb .Output ,_bg ,format ,args ...);};};const _gbf =30;
// Debug does nothing for dummy logger.
func (DummyLogger )Debug (format string ,args ...interface{}){};const Version ="\u0033\u002e\u0036\u0033\u002e\u0030";var ReleasedAt =_g .Date (_fbg ,_bde ,_cc ,_cgc ,_aaf ,0,0,_g .UTC );

// Trace logs trace message.
func (_ddd WriterLogger )Trace (format string ,args ...interface{}){if _ddd .LogLevel >=LogLevelTrace {_cgc :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_ddd .logToWriter (_ddd .Output ,_cgc ,format ,args ...);};};func _bce (_gf _bc .Writer ,_ddg string ,_aa string ,_feb ...interface{}){_ ,_efb ,_efbc ,_bbf :=_fc .Caller (3);
if !_bbf {_efb ="\u003f\u003f\u003f";_efbc =0;}else {_efb =_c .Base (_efb );};_fb :=_bd .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_ddg ,_efb ,_efbc )+_aa +"\u000a";_bd .Fprintf (_gf ,_fb ,_feb ...);};
func (_ef ConsoleLogger )Trace (format string ,args ...interface{}){if _ef .LogLevel >=LogLevelTrace {_fe :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_ef .output (_b .Stdout ,_fe ,format ,args ...);};};

// Info does nothing for dummy logger.
func (DummyLogger )Info (format string ,args ...interface{}){};
// Debug logs debug message.
func (_gg ConsoleLogger )Debug (format string ,args ...interface{}){if _gg .LogLevel >=LogLevelDebug {_de :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_gg .output (_b .Stdout ,_de ,format ,args ...);};};

// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_dcg WriterLogger )IsLogLevel (level LogLevel )bool {return _dcg .LogLevel >=level };
36 changes: 18 additions & 18 deletions common/license/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@
// terms that can be accessed at https://unidoc.io/eula/

// Package license helps manage commercial licenses and check if they are valid for the version of unipdf used.
package license ;import _f "github.com/unidoc/unipdf/v3/internal/license";

// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _f .GetLicenseKey ()};func SetMeteredKeyUsageLogVerboseMode (val bool ){_f .SetMeteredKeyUsageLogVerboseMode (val )};

// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
func GetMeteredState ()(_f .MeteredStatus ,error ){return _f .GetMeteredState ()};

// LicenseKey represents a loaded license key.
type LicenseKey =_f .LicenseKey ;
package license ;import _d "github.com/unidoc/unipdf/v3/internal/license";

// SetMeteredKeyPersistentCache sets the metered License API Key persistent cache.
// Default value 'true', set to `false` will report the usage immediately to license server,
// this can be used when there's no access to persistent data storage.
func SetMeteredKeyPersistentCache (val bool ){_f .SetMeteredKeyPersistentCache (val )};
func SetMeteredKeyPersistentCache (val bool ){_d .SetMeteredKeyPersistentCache (val )};

// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _d .MakeUnlicensedKey ()};

// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _d .SetLicenseKey (content ,customerName );};

// LicenseKey represents a loaded license key.
type LicenseKey =_d .LicenseKey ;

// SetMeteredKey sets the metered API key required for SaaS operation.
// Document usage is reported periodically for the product to function correctly.
func SetMeteredKey (apiKey string )error {return _f .SetMeteredKey (apiKey )};
func SetMeteredKey (apiKey string )error {return _d .SetMeteredKey (apiKey )};const (LicenseTierUnlicensed =_d .LicenseTierUnlicensed ;LicenseTierCommunity =_d .LicenseTierCommunity ;LicenseTierIndividual =_d .LicenseTierIndividual ;LicenseTierBusiness =_d .LicenseTierBusiness ;
);

// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _f .SetLicenseKey (content ,customerName );};const (LicenseTierUnlicensed =_f .LicenseTierUnlicensed ;LicenseTierCommunity =_f .LicenseTierCommunity ;LicenseTierIndividual =_f .LicenseTierIndividual ;
LicenseTierBusiness =_f .LicenseTierBusiness ;);
// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
func GetMeteredState ()(_d .MeteredStatus ,error ){return _d .GetMeteredState ()};

// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _f .MakeUnlicensedKey ()};
// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _d .GetLicenseKey ()};func SetMeteredKeyUsageLogVerboseMode (val bool ){_d .SetMeteredKeyUsageLogVerboseMode (val )};
Loading

0 comments on commit 353e1d7

Please sign in to comment.