Commit Graph

68 Commits

Author SHA1 Message Date
Michael R Sweet
c6f17cc20f
Fix some warnings. 2023-12-03 19:23:36 -05:00
Michael R Sweet
ddd984215a
Save work (debug printfs, etc.) 2023-11-15 08:38:47 -05:00
Michael R Sweet
b0a66eef78
Fix reading of PDF files from Crystal Reports (Issue #45) 2023-10-09 10:04:20 -04:00
Michael R Sweet
b0e4646f9d
Rework CR/LF skip code to be more consistent. 2023-10-06 14:41:55 -04:00
Michael R Sweet
7f6ffcda22
Fix a couple issues with parsing PDF files produced by Microsoft Reporting
Services (Issue #46)

- Odd cross-reference stream containing 3-byte generation number field for this
  16-bit value
- Odd empty hex strings
2023-10-06 10:46:30 -04:00
Michael R Sweet
4f10021e7e
Fix denial-of-service attack when reading corrupt PDF files. 2023-02-03 20:39:04 -05:00
Michael R Sweet
a3f3bbfe11
Fix pdfioFileGetAuthor, etc. APIs (Issue #33) 2022-07-12 18:36:08 -04:00
Michael R Sweet
316b0ad559
Add pdfioFileCreateTemporary function (Issue #29) 2022-05-15 22:52:53 -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
2f0d622873
Save work on resolving PDF loading issues with random PDFs using different encryption methods and line endings. 2021-11-01 21:30:46 -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
208c3419ff
Fix AES-128 writing/encryption. 2021-10-23 20:09:02 -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
493fbca31c
Save work on unit tests for crypto. RC4 and AES are having trouble for some reason... 2021-10-12 17:11:10 -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
0caea44f32
Implement MakeReader/Writer functions. 2021-10-10 23:08:56 -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
37e80d67b1
Use new random number function to generate file IDs. 2021-10-09 23:10:46 -04:00
Michael R Sweet
d5173d14da
Fix some Coverity-detected issues. 2021-10-08 13:49:48 -04:00
Michael R Sweet
43239eaf8a
Add placeholder password callback to support reading of encrypted PDF files in the future. 2021-09-27 08:37:14 -04:00
Michael R Sweet
ba9d03ecac
Update docos. 2021-09-27 08:11:53 -04:00
Michael R Sweet
d6746c08a4
Add pdfioFileCreateOutput API (Issue #21) 2021-09-27 07:41:50 -04:00
Michael R Sweet
b2db43afcb
Show an error when opening an encrypted PDF file. 2021-08-30 11:18:23 -04:00
Michael R Sweet
6aa5585eb4
Fix some compressed stream bugs. 2021-08-30 10:55:45 -04:00
Michael R Sweet
6f726602c6
Clean up object stream support. 2021-08-29 18:35:23 -04:00
Michael R Sweet
6d42b6834e
Don't try to pre-load object streams since that interferes with reading the
rest of an xref stream...
2021-08-24 14:07:34 -04:00
Michael R Sweet
6745f785b7
Fix bug with xref stream with no index.
Fix bug with pdfiOStreamPeek not appending new stream data to buffer.

Add more debug printfs for values.
2021-08-24 13:50:57 -04:00
Michael R Sweet
cd5158bae0
Implement support for multiple index arrays (Issue #8) 2021-08-23 14:31:19 -04:00
Michael R Sweet
d62faa51e1
Implement date value support (Issue #13) 2021-07-07 22:06:25 -04:00
Michael R Sweet
30343cdb00
Info catalog accessors (Issue #9) 2021-07-06 20:31:30 -04:00
Michael R Sweet
bbdf0cdb18
Add proper TrueType font support (Issue #2)
Still need to implement proper Unicode support (currently only writes WinAnsi
font descriptor and handles UTF-8 for 0-255...)
2021-06-17 10:18:55 -04:00
Michael R Sweet
a962b1d069
Fix another coverity issue. 2021-06-09 09:18:52 -04:00
Michael R Sweet
63c0fc1926
Fix some coverity-reported issues. 2021-06-09 09:14:57 -04:00
Michael R Sweet
a698b9c1a2
API cleanup, more work on documentation. 2021-06-07 08:34:30 -04:00
Michael R Sweet
ee5fcc2a4a
Fix Coverity-discovered issues. 2021-06-04 10:56:23 -04:00
Michael R Sweet
05df5919cd
Save work on text tests. 2021-05-31 20:51:37 -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
10ab119922
Initial documentation. 2021-05-29 21:21:45 -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
f1fb09c6c0
Switch back to compressed page content streams. 2021-05-28 22:24:39 -04:00
Michael R Sweet
94cb915885
Fix xref table - wrong total number of objects.
Update pdfioContentDrawImage to take x/y offsets and sizes.
2021-05-28 22:05:44 -04:00
Michael R Sweet
fb853dadda
Fix some issues with the core file writing code.
Add test images to the unit tests.
2021-05-28 10:41:21 -04:00
Michael R Sweet
45899f8a8d
Default CropBox should be the full MediaBox. 2021-05-16 18:31:45 -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
7cb4d0a557
Update TODOs. 2021-05-10 21:33:26 -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