Gunnsteinn Hall
9c0c5be661
Appender - Enhancements in Incremental Updates ( #474 )
...
* Improve loading and writing out merged-in fields/annotations Maintain annotations that are loaded as merged-in as merged in annotations when writing out.
* Appender fixes: Update objects instead of always adding new. Create xref chains (only entries for new changes in xref).
* Update AcroForm Fields object in new signed revisions
* Add test for multiple signing revisions with multiple fields and appearances
* Fix acroform handling to reuse object
2019-05-14 21:14:53 +00:00
Adrian-George Bostan
dcc0723e70
Search xref objects with tolerance both to the left and right ( #447 )
...
* Search xref objects with tolerance both to the left and right. Try searching xref to the left only if not found to the right.
2019-04-28 12:26:50 +00:00
Gunnsteinn Hall
7cfcb9cdfd
Parser: Treat empty indirect objects as containing the null object ( #446 )
...
* Fix when writing an indirect object with nil inner PdfObject (addresses #445 )
* Changed ParseIndirectObject to also handle parsing short indirect objects was EOFing right away previously.
2019-04-25 17:08:15 +00:00
Adrian-George Bostan
96daf06e35
Skip invalid data before PDF version on parse. ( #441 )
2019-04-24 19:04:30 +00:00
Gunnsteinn Hall
6e7b575f0f
Cross reference search speed improvements [v3] ( #424 )
...
* Change XrefTable to struct and add cache for speeding up search. Speedup object lookup to use cache in hasObject (writer). Changed to empty struct to reduce allocations.
2019-04-18 19:22:45 +00:00
Gunnsteinn Hall
f8ac397bdf
NewPdfReaderLazy supports reading PDF files in lazy-load mode ( #409 )
...
* Lazy loading support NewPdfReaderLazy.
* Change colorspace and annotations loading to lazy. Clean up page object loading.
* Clear up reference resolving and remove redundant traceToObject function.
* Add IsLogLevel function to logger. Can be used to avoid calling resource intensive functions except when running trace only.
2019-04-14 22:22:41 +00:00
Gunnsteinn Hall
ea91b30b1b
Fix for XRef stream parsing when last object not included ( #399 )
...
- xrefstream: Fix when Index too short. Instead of appending the number of objects appends higher than the maximum index. Fix object number for XRefs stream table when its own offset encountered. Test case included
2019-04-10 21:26:35 +00:00
Gunnsteinn Hall
de4fb06251
Parsing compatibility fixes [v3] ( #392 )
...
* Compatibility fix for exponential parsing with a testcase
* Compatilbity fix for invalid escaped hex in names: If invalid hex then treats the '#' and hex as regular text
2019-04-02 17:44:53 +00:00
Gunnsteinn Hall
c8b422ef57
Fix trace log
2019-03-28 10:06:18 +00:00
Gunnsteinn Hall
443b168e48
Fix numeric parsing bug when only a single number. Added testcase.
2019-03-15 10:13:07 +00:00
Adrian-George Bostan
559277a6e9
Fix core package golint notices that are not related to code documentation
2019-03-08 20:14:17 +00:00
Denys Smirnov
3687c83b37
errors should start with a lower case
2018-12-15 18:49:15 +05:00
Gunnsteinn Hall
1fe74f5116
Merge branch 'linter' of https://github.com/dennwc/unidoc into v3-dennwc-linter
2018-12-12 09:47:28 +00:00
Aleksei Pavliukov
e0f3189f5b
Add PdfAppender
2018-12-11 18:51:07 +03:00
Denys Smirnov
6d2c39043c
make sure comments begin with a type/function name
2018-12-09 20:22:33 +02:00
Denys Smirnov
99f3184879
define slices with a var instead of an empty literal
2018-12-09 19:28:50 +02:00
Gunnsteinn Hall
3454ec67dc
Merge branch 'v3' into v3-enhance-forms
2018-10-13 11:32:20 +00:00
Samuel Melrose
7a641b09d2
Add Comments for Expose PDF Version #230
2018-10-09 10:40:02 +00:00
Samuel Melrose
d3cc236351
Expose PDF Version #230
2018-10-08 10:27:39 +00:00
Denys Smirnov
42df346e69
core: split security handlers into a separate package
2018-10-08 00:18:18 +03:00
Denys Smirnov
1c19ba9e96
core: decouple security handlers with different revisions from PdfCrypt
2018-10-08 00:18:18 +03:00
Denys Smirnov
fd9b3746de
core: unexport remaining PdfCrypt fields
2018-10-08 00:18:18 +03:00
Denys Smirnov
bccaa87cdc
core: refactor encryption and decryption types
2018-10-08 00:18:18 +03:00
Denys Smirnov
b5288e7ddc
core: change permissions type to a bitmask
2018-10-08 00:18:18 +03:00
Gunnsteinn Hall
aea91f1ba9
Merge branch 'v3' into v3-enhance-forms
2018-09-29 16:59:16 +00:00
Denys Smirnov
d73bd8d1d2
core: correctly handle encryption of xref streams and trailer fields
2018-09-26 04:54:00 +03:00
Denys Smirnov
acd4308d56
Merge branch 'refactor' into v3
...
# Conflicts:
# pdf/core/crypt.go
# pdf/model/writer.go
2018-09-26 01:08:19 +03:00
Denys Smirnov
7b2f6a6aab
core: do not decrypt XRef streams and the Encrypt dictionary; fix #205
2018-09-25 01:48:29 +03:00
Denys Smirnov
b76c8a56c4
core: implement algorithm 11 and 12 (password check for R=5 and R=6)
2018-09-16 00:34:13 +03:00
Denys Smirnov
443efd4c4c
core: refactor encryption check
2018-09-13 22:37:53 +03:00
Gunnsteinn Hall
31ffe3158d
Clean up validation code and loading of signature dictionary as model
2018-08-16 17:39:51 +00:00
Gunnsteinn Hall
7bac3c779c
Merge branch 'v3' into enhance-forms
2018-08-03 21:15:21 +00:00
Peter Williams
502836666d
Merge remote-tracking branch 'upstream/v3' into render.v3
2018-07-21 21:20:39 +10:00
Peter Williams
96dba88f57
Added a test for CharcodeBytesToUnicode for TrueType fonts with ToUnicode cmaps
2018-07-17 17:43:11 +10:00
Gunnsteinn Hall
0435dff983
Merge branch 'v3' into enhance-forms
2018-07-15 20:17:02 +00:00
Gunnsteinn Hall
5b1b9bd504
PdfObjectArray change to struct and receivers added Elements, Get, Set, Len. Fixes to resulting broken code.
2018-07-15 17:52:53 +00:00
Gunnsteinn Hall
fc15ef442a
Cleaning up crossreferences - Unexporting, renaming, improving documentation
...
parser.Trace renamed to parser.Resolve
2018-07-14 14:07:33 +00:00
Gunnsteinn Hall
14ee80e1fe
Preserve and allow output of hexadecimal strings
...
Refactored PdfObjectString into a struct with bool flag for hex. Fixed any code broken by the change.
Unexported non-essential functions for crypto (not used by model). Can unexport more later or refactor to internal package.
2018-07-14 02:25:29 +00:00
Peter Williams
638c3557ce
Exposed PDF version reporting to callers
2018-06-28 11:37:57 +10:00
Gunnsteinn Hall
11ec4d42e3
Basic testing for form field models. Useful test functions added.
2018-06-18 15:26:29 +00:00
Gunnsteinn Hall
3b89a0ba98
Fixes #157
2018-05-20 23:33:24 +00:00
qz
b7efd634fe
Parser crude optimizations.
...
- parsing functions how collect results in bytes.Buffer
- added benchmarks
- parseHexString avoids calling skipSpace
2018-03-20 04:37:12 +03:00
qz
3f7e07ac9e
fixes #144 , using bytes.Buffer for more efficient string building
2018-03-05 13:04:27 +03:00
Gunnsteinn Hall
9e04cbd144
Limit maximum specified number of indirect objects when parsing xref stream. Fixes #111 .
2017-08-08 17:35:06 +00:00
Gunnsteinn Hall
22c2e5eb41
Address go vet issues
2017-08-04 22:50:28 +00:00
Gunnsteinn Hall
2adbc645ad
Fix comment typo
2017-08-04 08:26:36 +00:00
Gunnsteinn Hall
b800238e36
Address golint recommendations in core
2017-08-03 15:33:51 +00:00
Gunnsteinn Hall
2ecf2acce5
Checks on stated byte lengths in xref stream objects. Closes #94 .
2017-08-02 15:46:31 +00:00
Gunnsteinn Hall
28aea0d8d7
Address golint recommendations. Add TODO comments for recommended future refactoring work in next major release.
2017-08-02 12:56:32 +00:00
Gunnsteinn Hall
badce2938f
Address gofmt simplify items
2017-07-31 14:54:14 +00:00