Skip to content

Commit

Permalink
Merge pull request #468 from unidoc-build/prep-rc-v3.28.0
Browse files Browse the repository at this point in the history
prepare release v3.28.0
  • Loading branch information
gunnsth authored Aug 14, 2021
2 parents e189dd4 + 49979c7 commit 6aaefc8
Show file tree
Hide file tree
Showing 55 changed files with 13,330 additions and 12,498 deletions.
60 changes: 60 additions & 0 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,63 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
DanBloomberg Leptonica is an amazing C/C++ Open Source library. It provides raster operations, binary expansion and
reduction, JBIG2 component creators, correlation scoring and a lot more perfectly commented image operation functions.
That library was used as a very solid base for our image operation algorithms used by the JBIG2 Encoder.

* [sRGB2014 - Color Profile](http://www.color.org/srgbprofiles.xalter), Copyright International Color Consortium, 2015
This profile is made available by the International Color Consortium, and may be copied,
distributed, embedded, made, used, and sold without restriction. Altered versions of this
profile shall have the original identification and copyright information removed and
shall not be misrepresented as the original profile.

* [sRGB v4 ICC preference - Color Profile](http://www.color.org/srgbprofiles.xalter), Copyright 2007 International Color Consortium
This profile is made available by the International Color Consortium, and may be copied,
distributed, embedded, made, used, and sold without restriction. Altered versions of this
profile shall have the original identification and copyright information removed and
shall not be misrepresented as the original profile.

* [ISO Coated v2 Grey1c bas - Color Profile](https://www.colormanagement.org/en/isoprofile2009.html#ISOcoated_v2_grey1c_bas),
Copyright (c) 2007, basICColor GmbH

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must
not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must
not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.

* [ISO Coated v2 300 bas - Color Profile](https://www.colormanagement.org/en/isoprofile2009.html#ISOcoated_v2_300_bas),
Copyright (c) 2007-2010, basICColor GmbH

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must
not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must
not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.
623 changes: 311 additions & 312 deletions annotator/annotator.go

Large diffs are not rendered by default.

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

// Package common contains common properties used by the subpackages.
package common ;import (_e "fmt";_cd "io";_a "os";_gd "path/filepath";_ed "runtime";_g "time";);const _gbc =2021;func _aga (_ebe _cd .Writer ,_ae string ,_fde string ,_bg ...interface{}){_ ,_bcba ,_ca ,_bdg :=_ed .Caller (3);if !_bdg {_bcba ="\u003f\u003f\u003f";
_ca =0;}else {_bcba =_gd .Base (_bcba );};_ec :=_e .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_ae ,_bcba ,_ca )+_fde +"\u000a";_e .Fprintf (_ebe ,_ec ,_bg ...);};
package common ;import (_a "fmt";_c "io";_b "os";_ed "path/filepath";_d "runtime";_ae "time";);

// Trace logs trace message.
func (_cbb WriterLogger )Trace (format string ,args ...interface{}){if _cbb .LogLevel >=LogLevelTrace {_ag :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_cbb .logToWriter (_cbb .Output ,_ag ,format ,args ...);};};const (LogLevelTrace LogLevel =5;
LogLevelDebug LogLevel =4;LogLevelInfo LogLevel =3;LogLevelNotice LogLevel =2;LogLevelWarning LogLevel =1;LogLevelError LogLevel =0;);

// Error logs error message.
func (_eg ConsoleLogger )Error (format string ,args ...interface{}){if _eg .LogLevel >=LogLevelError {_f :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_eg .output (_a .Stdout ,_f ,format ,args ...);};};
// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};const Version ="\u0033\u002e\u0032\u0038\u002e\u0030";func (_dbe WriterLogger )logToWriter (_cb _c .Writer ,_ccf string ,_ga string ,_dfg ...interface{}){_eae (_cb ,_ccf ,_ga ,_dfg );};

// Info does nothing for dummy logger.
func (DummyLogger )Info (format string ,args ...interface{}){};
// NewWriterLogger creates new 'writer' logger.
func NewWriterLogger (logLevel LogLevel ,writer _c .Writer )*WriterLogger {_bec :=WriterLogger {Output :writer ,LogLevel :logLevel };return &_bec ;};

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

// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_ccb ConsoleLogger )IsLogLevel (level LogLevel )bool {return _ccb .LogLevel >=level };
// SetLogger sets 'logger' to be used by the unidoc unipdf library.
func SetLogger (logger Logger ){Log =logger };const _abf =30;

// Warning logs warning message.
func (_ea WriterLogger )Warning (format string ,args ...interface{}){if _ea .LogLevel >=LogLevelWarning {_bcb :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ea .logToWriter (_ea .Output ,_bcb ,format ,args ...);};};
// NewConsoleLogger creates new console logger.
func NewConsoleLogger (logLevel LogLevel )*ConsoleLogger {return &ConsoleLogger {LogLevel :logLevel }};

// Debug logs debug message.
func (_ac WriterLogger )Debug (format string ,args ...interface{}){if _ac .LogLevel >=LogLevelDebug {_efg :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_ac .logToWriter (_ac .Output ,_efg ,format ,args ...);};};
// Notice logs notice message.
func (_bce WriterLogger )Notice (format string ,args ...interface{}){if _bce .LogLevel >=LogLevelNotice {_gg :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_bce .logToWriter (_bce .Output ,_gg ,format ,args ...);};};

// LogLevel is the verbosity level for logging.
type LogLevel int ;
// Trace does nothing for dummy logger.
func (DummyLogger )Trace (format string ,args ...interface{}){};

// Debug logs debug message.
func (_fdf ConsoleLogger )Debug (format string ,args ...interface{}){if _fdf .LogLevel >=LogLevelDebug {_afa :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_fdf .output (_a .Stdout ,_afa ,format ,args ...);};};const _dfg =7;
// Info logs info message.
func (_aa ConsoleLogger )Info (format string ,args ...interface{}){if _aa .LogLevel >=LogLevelInfo {_cc :="\u005bI\u004e\u0046\u004f\u005d\u0020";_aa .output (_b .Stdout ,_cc ,format ,args ...);};};

// Error does nothing for dummy logger.
func (DummyLogger )Error (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 (_bd WriterLogger )IsLogLevel (level LogLevel )bool {return _bd .LogLevel >=level };

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

// IsLogLevel returns true from dummy logger.
func (DummyLogger )IsLogLevel (level LogLevel )bool {return true };const _gga ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";

// Info logs info message.
func (_dc WriterLogger )Info (format string ,args ...interface{}){if _dc .LogLevel >=LogLevelInfo {_gba :="\u005bI\u004e\u0046\u004f\u005d\u0020";_dc .logToWriter (_dc .Output ,_gba ,format ,args ...);};};
// Warning logs warning message.
func (_aea ConsoleLogger )Warning (format string ,args ...interface{}){if _aea .LogLevel >=LogLevelWarning {_ea :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_aea .output (_b .Stdout ,_ea ,format ,args ...);};};

// ConsoleLogger is a logger that writes logs to the 'os.Stdout'
type ConsoleLogger struct{LogLevel LogLevel ;};const Version ="\u0033\u002e\u0032\u0037\u002e\u0030";
// Trace logs trace message.
func (_aeg WriterLogger )Trace (format string ,args ...interface{}){if _aeg .LogLevel >=LogLevelTrace {_eeb :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_aeg .logToWriter (_aeg .Output ,_eeb ,format ,args ...);};};const _aaf ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";
const _ecf =2021;

// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};
// Info does nothing for dummy logger.
func (DummyLogger )Info (format string ,args ...interface{}){};const _fcd =8;func _eae (_gf _c .Writer ,_dgf string ,_da string ,_dfb ...interface{}){_ ,_dc ,_bg ,_ecg :=_d .Caller (3);if !_ecg {_dc ="\u003f\u003f\u003f";_bg =0;}else {_dc =_ed .Base (_dc );
};_ac :=_a .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_dgf ,_dc ,_bg )+_da +"\u000a";_a .Fprintf (_gf ,_ac ,_dfb ...);};var Log Logger =DummyLogger {};

// NewConsoleLogger creates new console logger.
func NewConsoleLogger (logLevel LogLevel )*ConsoleLogger {return &ConsoleLogger {LogLevel :logLevel }};
// Error logs error message.
func (_efg WriterLogger )Error (format string ,args ...interface{}){if _efg .LogLevel >=LogLevelError {_fc :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_efg .logToWriter (_efg .Output ,_fc ,format ,args ...);};};

// WriterLogger is the logger that writes data to the Output writer
type WriterLogger struct{LogLevel LogLevel ;Output _cd .Writer ;};
// Debug logs debug message.
func (_abb WriterLogger )Debug (format string ,args ...interface{}){if _abb .LogLevel >=LogLevelDebug {_fd :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_abb .logToWriter (_abb .Output ,_fd ,format ,args ...);};};

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

// Warning logs warning message.
func (_fa ConsoleLogger )Warning (format string ,args ...interface{}){if _fa .LogLevel >=LogLevelWarning {_ega :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_fa .output (_a .Stdout ,_ega ,format ,args ...);};};

// NewWriterLogger creates new 'writer' logger.
func NewWriterLogger (logLevel LogLevel ,writer _cd .Writer )*WriterLogger {_gab :=WriterLogger {Output :writer ,LogLevel :logLevel };return &_gab ;};var Log Logger =DummyLogger {};const _gdb =30;func (_efb WriterLogger )logToWriter (_gf _cd .Writer ,_dfd string ,_faf string ,_dae ...interface{}){_aga (_gf ,_dfd ,_faf ,_dae );
};
// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_fe WriterLogger )IsLogLevel (level LogLevel )bool {return _fe .LogLevel >=level };

// Trace logs trace message.
func (_fag ConsoleLogger )Trace (format string ,args ...interface{}){if _fag .LogLevel >=LogLevelTrace {_da :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_fag .output (_a .Stdout ,_da ,format ,args ...);};};
// IsLogLevel returns true from dummy logger.
func (DummyLogger )IsLogLevel (level LogLevel )bool {return true };

// Info logs info message.
func (_fd ConsoleLogger )Info (format string ,args ...interface{}){if _fd .LogLevel >=LogLevelInfo {_db :="\u005bI\u004e\u0046\u004f\u005d\u0020";_fd .output (_a .Stdout ,_db ,format ,args ...);};};
// UtcTimeFormat returns a formatted string describing a UTC timestamp.
func UtcTimeFormat (t _ae .Time )string {return t .Format (_aaf )+"\u0020\u0055\u0054\u0043"};

// Logger is the interface used for logging in the unipdf package.
type Logger interface{Error (_d string ,_b ...interface{});Warning (_cf string ,_be ...interface{});Notice (_ab string ,_ad ...interface{});Info (_eb string ,_bb ...interface{});Debug (_af string ,_ge ...interface{});Trace (_cc string ,_df ...interface{});
IsLogLevel (_bc LogLevel )bool ;};
// Trace logs trace message.
func (_cg ConsoleLogger )Trace (format string ,args ...interface{}){if _cg .LogLevel >=LogLevelTrace {_be :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_cg .output (_b .Stdout ,_be ,format ,args ...);};};func (_fa ConsoleLogger )output (_bf _c .Writer ,_aff string ,_bcg string ,_dbgd ...interface{}){_eae (_bf ,_aff ,_bcg ,_dbgd ...);
};

// Notice logs notice message.
func (_ef ConsoleLogger )Notice (format string ,args ...interface{}){if _ef .LogLevel >=LogLevelNotice {_gg :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_ef .output (_a .Stdout ,_gg ,format ,args ...);};};var ReleasedAt =_g .Date (_gbc ,_dfg ,_cg ,_ce ,_gdb ,0,0,_g .UTC );
func (_gb ConsoleLogger )output (_bbg _cd .Writer ,_ged string ,_ebg string ,_ga ...interface{}){_aga (_bbg ,_ged ,_ebg ,_ga ...);};

// Error logs error message.
func (_fe WriterLogger )Error (format string ,args ...interface{}){if _fe .LogLevel >=LogLevelError {_bde :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_fe .logToWriter (_fe .Output ,_bde ,format ,args ...);};};const _cg =29;
func (_dbg ConsoleLogger )Notice (format string ,args ...interface{}){if _dbg .LogLevel >=LogLevelNotice {_de :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_dbg .output (_b .Stdout ,_de ,format ,args ...);};};const _adb =15;

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

// SetLogger sets 'logger' to be used by the unidoc unipdf library.
func SetLogger (logger Logger ){Log =logger };
// ConsoleLogger is a logger that writes logs to the 'os.Stdout'
type ConsoleLogger struct{LogLevel LogLevel ;};

// Error logs error message.
func (_ab ConsoleLogger )Error (format string ,args ...interface{}){if _ab .LogLevel >=LogLevelError {_dd :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_ab .output (_b .Stdout ,_dd ,format ,args ...);};};

// Logger is the interface used for logging in the unipdf package.
type Logger interface{Error (_edg string ,_db ...interface{});Warning (_f string ,_fg ...interface{});Notice (_ec string ,_g ...interface{});Info (_gb string ,_dg ...interface{});Debug (_dba string ,_eb ...interface{});Trace (_bc string ,_ef ...interface{});
IsLogLevel (_cf LogLevel )bool ;};

// DummyLogger does nothing.
type DummyLogger struct{};const _ce =15;
type DummyLogger struct{};

// Trace does nothing for dummy logger.
func (DummyLogger )Trace (format string ,args ...interface{}){};
// Warning logs warning message.
func (_ad WriterLogger )Warning (format string ,args ...interface{}){if _ad .LogLevel >=LogLevelWarning {_fee :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ad .logToWriter (_ad .Output ,_fee ,format ,args ...);};};

// Info logs info message.
func (_bfg WriterLogger )Info (format string ,args ...interface{}){if _bfg .LogLevel >=LogLevelInfo {_ee :="\u005bI\u004e\u0046\u004f\u005d\u0020";_bfg .logToWriter (_bfg .Output ,_ee ,format ,args ...);};};const _cce =12;

// LogLevel is the verbosity level for logging.
type LogLevel int ;var ReleasedAt =_ae .Date (_ecf ,_fcd ,_cce ,_adb ,_abf ,0,0,_ae .UTC );

// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_af ConsoleLogger )IsLogLevel (level LogLevel )bool {return _af .LogLevel >=level };

// WriterLogger is the logger that writes data to the Output writer
type WriterLogger struct{LogLevel LogLevel ;Output _c .Writer ;};
24 changes: 12 additions & 12 deletions common/license/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
// 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 _g "github.com/unidoc/unipdf/v3/internal/license";

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

// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _g .GetLicenseKey ()};
package license ;import _a "github.com/unidoc/unipdf/v3/internal/license";

// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _g .MakeUnlicensedKey ()};const (LicenseTierUnlicensed =_g .LicenseTierUnlicensed ;LicenseTierCommunity =_g .LicenseTierCommunity ;LicenseTierIndividual =_g .LicenseTierIndividual ;LicenseTierBusiness =_g .LicenseTierBusiness ;
);
func MakeUnlicensedKey ()*LicenseKey {return _a .MakeUnlicensedKey ()};

// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _a .SetLicenseKey (content ,customerName );};const (LicenseTierUnlicensed =_a .LicenseTierUnlicensed ;LicenseTierCommunity =_a .LicenseTierCommunity ;LicenseTierIndividual =_a .LicenseTierIndividual ;
LicenseTierBusiness =_a .LicenseTierBusiness ;);

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

// LicenseKey represents a loaded license key.
type LicenseKey =_g .LicenseKey ;
type LicenseKey =_a .LicenseKey ;

// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _a .GetLicenseKey ()};

// 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 _g .SetMeteredKey (apiKey )};
func SetMeteredKey (apiKey string )error {return _a .SetMeteredKey (apiKey )};
Loading

0 comments on commit 6aaefc8

Please sign in to comment.