32 Commits

Author SHA1 Message Date
Adrian-George Bostan
9a553c30ba Add NewOutlineFromReaderOutline 2020-01-15 23:02:05 +02:00
Adrian-George Bostan
8afe2c21ed Export Outline and OutlineItem entries 2020-01-15 20:04:06 +02:00
Adrian-George Bostan
2c395a6598 Add GetContext method for exporting the outline tree node context 2020-01-15 19:42:16 +02:00
Adrian-George Bostan
ac736a2f78 Improve traversal of outline item nodes in the GetOutlinesFlattened method 2020-01-14 21:39:12 +02:00
Adrian-George Bostan
33530535e3 Use utf-16 encoding for serializing outline item titles 2020-01-13 20:56:02 +02:00
Adrian-George Bostan
53623b5157 Prevent recursive parsing of invalid circular outlines 2019-12-17 20:29:02 +02:00
Adrian-George Bostan
23aec77478 Add basic support for UTF-16 text encodings (#203)
* Add UTF-16 text encoder
2019-11-28 00:47:00 +00:00
Gabriel Vasile
d1a81d79d2 Add NewPdfFontFromTTF(io.ReadSeeker) function. (#199)
* Add NewPdfFontFromTTF(io.ReadSeeker) function.
2019-11-20 23:05:40 +00:00
Peter Williams
362ba7349d Changes to make the lazy reader work on the PaperCut corpus (#194) 2019-10-28 20:49:07 +00:00
Adrian-George Bostan
0bd31c8f84 Parse signature certificate arrays on signature validation 2019-09-26 21:32:56 +03:00
Adrian-George Bostan
da010a9d44 Prevent recursion when parsing outlines 2019-09-19 19:38:24 +03:00
Adrian-George Bostan
07615469c9 Fix panic when loading composite fonts (#164)
* Fix loading composite fonts when no glyph names are provided
* Make handling of unsupported runes consistent between paragraph components
2019-09-07 11:19:39 +00:00
Adrian-George Bostan
56e81d3a1a Take decode arrays into account when processing grayscale images (#159)
* Take decode arrays into account when processing grayscale images
* Adapt image extraction test case hashes
* Minor refactoring in the ColorAt image method
* Always return vanilla data from the jbig2 decoder
2019-08-30 19:16:23 +00:00
Gunnsteinn Hall
b1c851b7b0
Becoded action support (#161)
* initial commit to add action support
* Add support for all actions as defined in the specs
* Implement filespec for actions
* Add url filespec test
* update file test
* Implement remarks + add tests
2019-08-30 08:50:30 +00:00
Adrian-George Bostan
febf633172 Image memory optimizations (#149)
* Add ColorAt method for images
* Avoid resample on image to Go image conversion
* Avoid resample when converting grayscale image to RGB
* Preserve old behavior of image to Go image conversion
* Add missing case in the ToGoImage method
* Fix grayscale to RGB image conversion
* Improve code documentation
* Fix color extraction for CMYK and 4 bit RGB
* Add test case for the ColorAt image method
* Avoid resampling when converting CMYK image to RGB
* Add notice comment for the GetSamples/SetSamples image methods
2019-08-22 20:15:16 +00:00
Gunnsteinn Hall
d2e7eda95f
Lazy loading improvements (#131)
* Simplify lazy loading logic, remove redundancy. Fixes, improved performance.
* Additional lazy reader fixes
* Make core.IsNullObject method resolve references
* Adapt appender test cases for lazy reader usage
2019-07-24 21:19:13 +00:00
Adrian-George Bostan
550d79472e Add option to generate appearance dicts when filling form fields (#128) 2019-07-22 17:19:02 +00:00
Gunnsteinn Hall
0668159af1
Optimize: Use original if smaller than "compressed" (#118)
* Optimize: Use smallest image. Addresses #51.
2019-07-11 20:24:46 +00:00
Adrian-George Bostan
e68b7c664b Avoid unnecessary allocations when converting gray scale image to RGB (#117) 2019-07-10 21:13:49 +00:00
Adrian-George Bostan
2f4fe8cfd2 Resolve references when adding page to writer from a lazy reader (#115) 2019-07-10 04:18:34 +00:00
Adrian-George Bostan
2689453ae1 Resolve page parents when adding page to writer (#110) 2019-07-05 16:02:25 +00:00
Peter Williams
3de3705eb2 Fixed CalRGB -> RRB image conversion. (#103) 2019-07-03 13:35:15 +00:00
Adrian-George Bostan
13e08e064c Skip invalid outline nodes (#101)
* Skip invalid outline nodes when building outline tree
* Add methods for accessing and writing named destinations
2019-06-27 20:08:40 +00:00
Adrian-George Bostan
d8dcc051b3 Fix annotation flatten when AcroForm does not exist (#93)
* Fix annotation flatten when AcroForm does not exist.
* Adapt test case file hashes to account for file flattening
2019-06-25 19:29:03 +00:00
Adrian-George Bostan
2227f4f372 Resolve page Resources references on writer page add, if page reader is lazy (#97) 2019-06-24 20:07:15 +00:00
Adrian-George Bostan
05eee50b4c Skip invalid Metadata stream in form field Kids array 2019-06-13 20:37:14 +03:00
Adrian-George Bostan
441e9a3177 Attempt to identify Pages nodes without Type (#85) 2019-06-11 22:02:36 +00:00
Adrian-George Bostan
4290e33c36 Skip loading outlines on invalid outline root node (#84) 2019-06-10 19:16:03 +00:00
Adrian-George Bostan
7e56b89e18 Fix page resources not being loaded from parent nodes (#78) 2019-06-07 21:59:14 +00:00
Gunnsteinn Hall
a9d8725810
Merge master into development (#71) 2019-06-02 16:21:07 +00:00
Adrian-George Bostan
8425bf7c8f Update page resources Font dictionary when applying license information (#5)
* Make PdfObjectDictionary Merge method chainable
* Update page resources Font dictionary when applying license information
* Add license font to the page resources only when it does not exist
* Update hash for split test after verification
2019-05-30 10:52:05 +00:00
Adrian-George Bostan
c64812093d Remmove pdf folder and move packages up one level (#2) 2019-05-16 20:44:51 +00:00