Samuel Melrose
d3cc236351
Expose PDF Version #230
2018-10-08 10:27:39 +00: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
Gunnsteinn Hall
7f83a4ea2f
Add bounds check in crypt, parser. Avoid division by zero.
2017-07-23 20:20:05 +00:00
Gunnsteinn Hall
9ff2413609
Add check to ensure stream length cannot be larger than file size. Test cases updated.
2017-07-23 12:21:42 +00:00
Gunnsteinn Hall
68bca163a9
Type checking for index list elements
2017-07-23 11:47:21 +00:00
Gunnsteinn Hall
124bd10e7c
Check bounds on XRef stream index list (found by fuzzing)
2017-07-23 11:37:35 +00:00
Gunnsteinn Hall
99872f29ba
Type check for xref Prev entries added.
2017-07-23 01:54:31 +00:00
Gunnsteinn Hall
b2bb6d9836
Fixed problem found by fuzzing when Encrypt pointing to invalid reference
2017-07-22 16:44:42 +00:00
Gunnsteinn Hall
6e30b10029
Prevent recursive loop errors while tracing stream Lengths. Test case included. Fixes #80 .
2017-07-22 12:11:58 +00:00
Gunnsteinn Hall
1cf2ac4a98
Fix error return value
2017-07-22 11:17:48 +00:00
Gunnsteinn Hall
469856432b
Fix fuzz-detected problem where stream length referring to stream itself (with a test case to verify)
2017-07-21 21:31:23 +00:00
Gunnsteinn Hall
1769c68234
Add type check for Size in trailer. Fixes #77
2017-07-21 14:18:35 +00:00
Gunnsteinn Hall
71807ecfa4
Exposed a reader function to check access rights. Fixed incorrect bit name for AccessPermissions (LimitPrintQuality->FullPrintQuality). Fix in owner password authentication. Closes #51 .
2017-07-12 09:48:16 +00: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
5c5ad1bc14
Enhancements to tolerate more malformed PDFs. Fixes #47
2017-04-27 22:25:00 +00:00
Gunnsteinn Hall
532f564b3a
EOF marker seek more forgiving #46
2017-04-26 08:53:18 +00:00
Gunnsteinn Hall
90caacec66
Improved crypto handling for encrypt dicts with references
2017-03-29 15:54:50 +00:00
Gunnsteinn Hall
0e56876030
Repair for broken pdfs with too long stream lengths
2017-03-08 19:59:29 +00:00
Gunnsteinn Hall
c599f8decc
Fix package comments
2017-03-02 12:49:42 +00:00
Gunnsteinn Hall
9247f5d954
Add Trace log level and change Debug to Trace where appropriate. Add log levels to Console logger.
2017-02-28 12:16:46 +00:00
Gunnsteinn Hall
f1ada05914
Support parsing and getting the actual version number and changing the output PDF version
2017-02-28 08:58:50 +00:00
Gunnsteinn Hall
80fa077d15
1) Fix trailer dict parsing bug, 2) Get Read/Write OCProps, 3) Read/Write Page Resource Properties
2017-02-15 14:21:20 +00:00
Gunnsteinn Hall
765c30efa4
Fix bug with comments within indirect objects
...
Add some more debugs which can be helpful for troubleshooting
problematic pdf files
2017-01-12 12:23:28 +00:00
Gunnsteinn Hall
4693588a5f
Fix for stream delimiting
2017-01-09 22:00:26 +00:00
Gunnsteinn Hall
36ba97ca37
Fix bug with stream in rare malformant PDF cases
2016-12-13 19:39:23 +00:00