Michael R Sweet
7330cc35ba
Defer object/value decryption to after the object is loaded (Issue #42 )
2023-12-14 16:02:26 -05:00
Michael R Sweet
2a85baaf81
Increase the maximum number of object streams in a file (Issue #58 ) - most files
...
only contain 1 or 2...
Change the implementation of add/find object to use a custom binary insertion
sort algorithm rather than doing a qsort after every addition. This results in
a significant improvement in open speed - from 2371 seconds (about 39.5 minutes)
to 3.1 seconds for one large test file (an ESRI standard).
2023-12-13 12:26:25 -05:00
Michael R Sweet
2b92044504
Support per-object file IDs (Issue #42 )
2023-12-12 21:48:58 -05:00
Michael R Sweet
c188cb8dad
Finish implementation of pdfioContentTextMeasure (Issue #17 )
2023-12-04 21:20:51 -05:00
Michael R Sweet
4919783da5
Save work on string measure support (Issue #17 )
2023-12-04 18:54:33 -05:00
kleuter
acb6b66bdb
added windows.h header for GetTempPathA
2023-10-10 09:12:03 +02:00
Michael R Sweet
a3ea0a99ff
Cleanup spacing and comments.
2023-10-06 14:39:42 -04:00
Michael R Sweet
87ca4db73f
Clean up private header.
2023-10-02 05:27:40 -04:00
Michael R Sweet
067683cbcd
Add some protection against opening multiple streams in the same file at the same time.
2022-07-04 13:03:11 -04:00
Michael R Sweet
a431d7806f
Fix a few stack/buffer overflow bugs discovered by Bart, Steffan, and Mark from
...
the Radboud University NL (thanks!)
- Add depth argument to all value read functions that recurse
- Add depth argument to page tree loading code
- Validate xref stream sizes individually to avoid out-of-bounds access to local
xref buffer.
2021-11-29 17:46:56 -05:00
Michael R Sweet
790cd440ea
Fix up copying objects from unencrypted to AES-encrypted documents (still looks
...
like there are some issues with strings in dicts)
2021-10-25 21:22:59 -04:00
Michael R Sweet
038046e6d5
Save work on encrypted PDF reading.
2021-10-25 19:36:39 -04:00
Michael R Sweet
234c3a7381
Do some reorganization and start the implementation of decryption.
2021-10-24 10:59:25 -04:00
Michael R Sweet
dd56317635
Need object when reading/writing encrypted PDFs (to decrypt/encrypt strings),
...
RC4 writing is now working, AES-128 needs work, AES-256 hasn't been done yet.
2021-10-23 18:08:16 -04:00
Michael R Sweet
3af39d5d1f
Update crypto callback to return the number of output bytes (to account for AES
...
expansion).
2021-10-23 14:37:25 -04:00
Michael R Sweet
c24243a2bc
Refactor crypto callback to have separate input/output pointers. Add initial writing support.
2021-10-12 09:13:30 -04:00
Michael R Sweet
3de55421b5
New member names to specify type of value.
2021-10-10 22:40:42 -04:00
Michael R Sweet
61a7964d90
Implement pdfioFileSetPermissions.
2021-10-10 22:27:09 -04:00
Michael R Sweet
953de26f6b
Add random number generation support.
2021-10-09 23:05:39 -04:00
Michael R Sweet
2245c9d4f5
Move AES code to separate file, prep private API for making keys/contexts/callbacks for encryption.
2021-10-09 10:49:22 -04:00
Michael R Sweet
9c05f802fc
Add SHA-256 code from RFC 6234.
2021-10-08 18:55:25 -04:00
Michael R Sweet
7fe093f3bd
Save work on AES and RC4.
2021-10-04 21:13:01 -04:00
Michael R Sweet
d6746c08a4
Add pdfioFileCreateOutput API (Issue #21 )
2021-09-27 07:41:50 -04:00
Michael R Sweet
87b9ea87ad
Save work on documentation.
2021-07-24 13:08:46 -04:00
Michael R Sweet
30343cdb00
Info catalog accessors (Issue #9 )
2021-07-06 20:31:30 -04:00
Michael R Sweet
10c8d222cf
Test both CP1252 and Unicode font rendering.
...
Add cached CP1252 and Unicode font encoding objects.
Clean up CP1252 ("simple") TrueType font embedding.
2021-06-23 21:26:01 -04:00
Michael R Sweet
6f02bdd301
Initial Visual Studio support.
2021-06-21 11:39:06 -04:00
Michael R Sweet
a698b9c1a2
API cleanup, more work on documentation.
2021-06-07 08:34:30 -04:00
Michael R Sweet
3efb4f800b
Fix PNG predictor 12, 14, and 15.
2021-06-01 17:48:36 -04:00
Michael R Sweet
246c2e4b41
Rename as PDFio for consistency.
...
Add PDFio logo image.
Move documentation to "doc" subdirectory.
2021-05-30 07:10:44 -04:00
Michael R Sweet
a18b8fd606
Switch to using double for numbers, since they are also used to record lengths
...
and other potentially large contents.
2021-05-29 21:16:21 -04:00
Michael R Sweet
35d22705fa
Implement pdfioObjCopy and pdfioPageCopy, with tests.
2021-05-29 20:00:48 -04:00
Michael R Sweet
128d5f0d42
Implement JPEG image object support.
2021-05-25 16:31:32 -04:00
Michael R Sweet
548ff7d119
Initial writing support.
2021-05-16 11:39:05 -04:00
Michael R Sweet
17f2cc213e
Implement object mapping framework.
2021-05-13 13:18:01 -04:00
Michael R Sweet
18853ca3d5
Increase token buffer to 256 bytes, to avoid overflow scenarios.
...
Add _pdfioTokenFlush to manually flush the token buffer.
Add more debug printfs.
2021-05-10 17:37:57 -04:00
Michael R Sweet
cfb5ca0ddc
Rework error/debug output.
2021-05-10 08:40:52 -04:00
Michael R Sweet
9a919d478f
Rework token reading to be separate from the PDF file so we can add support
...
for compressed object streams.
2021-05-08 07:38:44 -04:00
Michael R Sweet
923409ceff
Save work on PNG predictors. Apparently object streams are also a common thing
...
for newer Acrobat so we'll need to implement those, too.
2021-05-07 19:51:38 -04:00
Michael R Sweet
44325ce2d9
Safe work on streams - still need to implement predictors
2021-05-07 08:47:49 -04:00
Michael R Sweet
c61d6ad686
Save work on streams.
2021-05-06 16:08:08 -04:00
Michael R Sweet
d2a0484d93
Rework debug functions, start xref stream support.
2021-05-06 09:51:48 -04:00
Michael R Sweet
7afdfc725c
Implement object loading.
2021-05-04 17:04:09 -04:00
Michael R Sweet
7733fbeb10
Rework object and xref processing to allow for sparse object lists and generation numbers.
2021-05-04 16:06:14 -04:00
Michael R Sweet
59ef6b48ed
Add some debug output, "debug" make target.
...
Fix loading of dicts, trailer.
2021-05-04 12:59:10 -04:00
Michael R Sweet
516c6b9ace
Load trailer dict.
2021-05-04 12:24:29 -04:00
Michael R Sweet
a5468b1b87
Implement value/array/dict reading, refactor indirect references.
2021-05-04 10:34:17 -04:00
Michael R Sweet
4b05ca6436
Token parsing code.
2021-05-01 22:38:11 -04:00
Michael R Sweet
e107b94c83
Work on token parsing.
2021-05-01 17:50:52 -04:00
Michael R Sweet
d13364a4fd
Implement pdfioFileOpen reading of xref table.
2021-05-01 11:41:43 -04:00