138 Commits

Author SHA1 Message Date
Aleksei Pavliukov
ea5dba8e0d Implemented : PDFs optimization 2018-09-30 01:01:31 +03:00
Denys Smirnov
418b99b4d8 core: detect old copies of Encrypt dictionary; fix #215 2018-09-29 00:16:57 +03:00
Denys Smirnov
d73bd8d1d2 core: correctly handle encryption of xref streams and trailer fields 2018-09-26 04:54:00 +03:00
Gunnsteinn Hall
6cafab4121 Merge branch 'master' into v3 2018-09-25 23:37:11 +00:00
Denys Smirnov
760f58b954 core: add doc comments for CFMs 2018-09-26 02:16:17 +03:00
Denys Smirnov
4b01f8f6ae update code after merge with master 2018-09-26 01:46:13 +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
b3c45a550a core: refactor crypt filter selection code 2018-09-26 00:52:05 +03:00
Denys Smirnov
d551451585 core: move common code for object key generation to a separate function 2018-09-26 00:52:05 +03:00
Denys Smirnov
be03592b2a core: move CFM to separate structs that implement a common interface 2018-09-26 00:52:05 +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
8450ebcef6 core: use type switch instead of if statements in encode and decode 2018-09-20 02:00:01 +03:00
Denys Smirnov
b7dcbc22de core: fix standard crypt filter name; resolves issues with Adobe Reader 2018-09-19 23:48:50 +03:00
Denys Smirnov
eac1e899dc core: allow to write documents with AES encryption 2018-09-19 06:02:15 +03:00
Denys Smirnov
839f9ea3bc core: fix padding for AESv3 2018-09-19 06:01:29 +03:00
Denys Smirnov
d424bc2b6d core: add MakeBool helper 2018-09-19 06:00:19 +03:00
Denys Smirnov
d4b2490ea3 core: implement encryption algorithms 8-10; add tests for alg 8-13 2018-09-19 03:33:59 +03:00
Denys Smirnov
7fb4c91137 core: do not overwrite Perms then validating it 2018-09-19 03:12:49 +03:00
Denys Smirnov
e18e4b502c core: move zero iv allocation to a separate function 2018-09-19 02:44:26 +03:00
Denys Smirnov
1371f91098 core: check metadata encryption flag in alg13 2018-09-19 02:43:32 +03:00
Denys Smirnov
c7cfde7c1f core: move test data, add docs and link to the specification 2018-09-17 17:36:31 +03:00
Denys Smirnov
c08a13c234 core: optimize allocations for hash used in R=6 2018-09-16 17:10:04 +03:00
Denys Smirnov
6e2c1c51bf core: add a test case for files with a very long password 2018-09-16 15:31:02 +03:00
Denys Smirnov
8f4f1804b0 core: implement decoding of AESv3; resolves #30 2018-09-16 04:13:24 +03:00
Denys Smirnov
6510d0a853 core: algorithms 2a and 13 (decode file key and validate permissions) 2018-09-16 02:48:08 +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
Peter Williams
b7f1f3e291 Merge branch 'v3' of https://github.com/unidoc/unidoc into render.v3.hungarian 2018-08-22 22:01:00 +10:00
Peter Williams
cc4f64fa98 small tidy up 2018-08-21 12:43:51 +10:00
Gunnsteinn Hall
2cc0c74b80 Avoid endless loop when parsing operand in contenstream. Fixes #176 2018-08-09 22:51:21 +00:00
Gunnsteinn Hall
68a1dee9f2 Fix minimal parsing testcase 2018-08-03 11:01:54 +00:00
Gunnsteinn Hall
c9ec3ff8d9 godoc fix 2018-08-03 10:17:17 +00:00
Gunnsteinn Hall
cc44dd2552 Merge branch 'master' into v3 2018-08-01 22:04:27 +00:00
Gunnsteinn Hall
7fe68915cc Disable trace logging when running tests 2018-08-01 13:19:05 +00:00
Peter Williams
84a4e0ebbf Removed GetArrayVal 2018-07-25 13:19:09 +10:00
Peter Williams
b1cf3494f7 Removed naked returns. Fixed godoc. Reorganized object extractors 2018-07-25 12:00:49 +10:00
Peter Williams
990a56dc01 fixed typo 2018-07-22 16:00:45 +10:00
Peter Williams
bb3d219355 cleaned up comments 2018-07-22 12:47:38 +10:00
Peter Williams
502836666d Merge remote-tracking branch 'upstream/v3' into render.v3 2018-07-21 21:20:39 +10:00
Peter Williams
c489d4630c Added some logging 2018-07-21 08:43:03 +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
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
Peter Williams
6582182078 reduced differences with compositefont branch 2018-07-15 16:28:56 +10: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
Gunnsteinn Hall
5e9ff8d3ca Helper functions for PdfObject conversions 2018-07-14 02:14:31 +00:00
Peter Williams
bc1e9ae7b5 Refactored font code to improve text extraction 2018-07-13 17:40:27 +10:00
Gunnsteinn Hall
3bd7800729 Helper functions for dictionary 2018-07-08 09:58:54 +00:00
Peter Williams
33079bbb72 Parse FontFile entry in FontDescriptor 2018-07-03 14:26:42 +10:00
Peter Williams
c6f7cf9eef Got Type0 font -> obj -> font test passing 2018-06-29 18:09:44 +10:00