30 Commits

Author SHA1 Message Date
Denys Smirnov
3687c83b37 errors should start with a lower case 2018-12-15 18:49:15 +05:00
Denys Smirnov
3f7ad73812 refactor some receiver and method names; fix typos in comments 2018-12-11 04:37:00 +02:00
Denys Smirnov
6d2c39043c make sure comments begin with a type/function name 2018-12-09 20:22:33 +02:00
Gunnsteinn Hall
3536d323fb Support MK appearance characteristics for certain styles. Wrap content stream to fix bugs. 2018-10-05 01:59:19 +00:00
Gunnsteinn Hall
e352432bf9 Fix for compressed XObject stream generation 2018-10-03 22:35:58 +00:00
Peter Williams
1b1af0faae changes left out of last commit 2018-06-27 16:48:32 +10:00
Peter Williams
608b2bf51e check that SMask is PdfObjectStream 2018-05-05 18:07:09 +10:00
Peter Williams
4b2d244fe0 When converting XImage objects to grayscale, also set the Matts of their SMask images to grayscale if they have SMasks 2018-05-02 17:14:31 +10:00
Peter Williams
6692c21b74 Don't reuse parts of old objects 2018-04-27 10:06:36 +10:00
Peter Williams
309e23f65d Merge branch 'master' of https://github.com/peterwilliams97/unidoc 2018-01-11 18:33:08 +11:00
Peter Williams
4a20c56de0 Merge remote-tracking branch 'upstream/master'
* upstream/master:
  Fix #131: Return error on pageNumber = 0
  Added SetForms to Creator
  Insert a space when TJ string is offset by more than a threshold
  Support for resampling images with BitsPerComponent != 8.
  dont encode glyphs when you only wrap
  Add support for specifying alternate image encoding/compression method (creator).
  Add commercial license to repository and full AGPL license text. Updated licensing text in README.
  Updated version
  Few fixes: Shadingtype 4 handling, inline image handling (compatibility), encoding name (compatibility)
  Improved CS handling with Separation, Lab color ranges.
  Fix in handling of indexed colorspace parsing inline images when using base=DeviceRGB rather than shortcut.  Closes #114.
  Support indexed cs in inline image. Fixes #113. Fixes in lab colorspace color processing.
  Allow array in DecodeParms in FlateDecoder of length 1 (containing dict).
  Fix problem with MultiEncoder DecodeParms.  Fixes #97.
  Limit maximum specified number of indirect objects when parsing xref stream.  Fixes #111.
  Error -> Debug log
2018-01-11 17:52:09 +11:00
Peter Williams
e4adfd91a3 Merge branch 'master' of https://github.com/peterwilliams97/unidoc
* 'master' of https://github.com/peterwilliams97/unidoc: (50 commits)
  Fixing lab colorspace component input ranges.  Fix Indexed cs Image to rgb conversion.
  Make float parsing more like gs
  Fixed Lab bounds
  Added dummy encodings
  Added dummy encodings
  Fix PS processing of dup operand. Fixes #98.
  Check sizes for memory allocation based on pdf user inputs. Fixes #107.
  Check to avoid division by zero.  Fixes #106.
  Add GetObjectNums
  Address go vet issues
  Fix comment typo
  Fixed some bugs found while getting pdf_descibe.go to work
  Address golint recommendations in core
  Address core golint recommendations in crypt, io
  Add check for base colorspace type when loading Indexed colorspace.  Fixes #95.
  Address more golint recommendations  #89
  Checks on stated byte lengths in xref stream objects.  Closes #94.
  Address golint recommendations. Add TODO comments for recommended future refactoring work in next major release.
  Only attempt to load annotation from a valid indirect object for annotation Popup entries.  Fixes #91.
  Address godoc code block line wrapping
  ...
2018-01-11 17:43:17 +11:00
Peter Williams
651ff90214 Set encoding when transforming patterns. Preserve SMasks when transforming image Xobjects 2018-01-11 16:25:04 +11:00
Gunnsteinn Hall
50041f0a78 Support indexed cs in inline image. Fixes #113. Fixes in lab colorspace color processing.
Exported NewPdfColorspaceFromPdfObject so could use it from package
content stream.  Moving from dot imports.
2017-08-10 07:23:42 +00:00
Peter Williams
141519790a Fixed some bugs found while getting pdf_descibe.go to work 2017-08-04 17:47:55 +10:00
Peter Williams
43ecf3b325 Merge remote-tracking branch 'upstream/v2' 2017-07-24 15:23:12 +10:00
Gunnsteinn Hall
10c3be8c95 Change PdfObjectDictionary from map to struct and introduce ordered keys. Syntax change. Fixes all around to accommodate changes. Also fixes in test cases. Closes #56. 2017-07-08 21:04:13 +00:00
Gunnsteinn Hall
42c36270cc Remove unnecessary name parameter when creating XObject image. 2017-06-19 16:43:17 +00:00
Gunnsteinn Hall
fc9e540889 Added support for inserting images with an alpha transparency channel. Closes #52. 2017-06-06 21:16:55 +00:00
Peter Williams
5176b0b6b7 Allow xobject image modification that preserves unchanged parts of original xobject 2017-05-05 18:16:21 +10:00
Gunnsteinn Hall
784a60e42b Encoding fixes for images
Support avg, paeth predictors for decoding. Special error flag for
unsupported error parameters. Support specifying encoder when creating
new image objects (inline,xobject).
2017-04-19 11:46:53 +00:00
Gunnsteinn Hall
88d1f6283f Initial prototype for annotator and draw packages for creating annotations and drawing paths for content stream creation. 2017-04-09 16:49:15 +00:00
Gunnsteinn Hall
9c2dd082ab Fixes for resource and stream handling for Form Objects. 2017-04-04 12:09:26 +00:00
Gunnsteinn Hall
8ae4f6a63a Initial implementation of a simple graphics state handler / content stream processor. Multiple changes and fixes in colorspace handling. And more. 2017-03-14 13:04:51 +00:00
Gunnsteinn Hall
c12af8b3d2 Added basic compress function for XObject images 2017-03-08 16:52:37 +00:00
Gunnsteinn Hall
ae934afa19 Fixes in CMYK colorspace handling
Some workaround for JPEG CMYK data (inversion), needs more testing
2017-03-05 22:41:38 +00:00
Gunnsteinn Hall
61bcb5ad5f Fixes in some colorspace handling for images. Improved XObject form handling. 2017-03-04 17:27:23 +00:00
Gunnsteinn Hall
4aa6845e27 Refactored contentstream into a separate package. 2017-03-01 16:02:53 +00:00
Gunnsteinn Hall
445d670f0c Fixes in image and colorspace handling.
DCTDecode filter implemented in core/encoding.go.  Various fixes here
and there.
2017-02-24 17:38:41 +00:00
Gunnsteinn Hall
b8a3ec7180 Initial colorspace and functions support.
Implementation of ps parser for function type 4.  Function type 3 not
implemented yet and type 0 needs a better interpolation. Functions and
colorspaces need more testing.
2017-02-22 21:10:57 +00:00