2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-07 12:50:52 +00:00
Commit Graph

1769 Commits

Author SHA1 Message Date
Jay Berkenbilt
07f40bd254 QUtil::double_to_string: trim trailing zeroes with option to disable 2021-02-13 02:30:00 -05:00
Jay Berkenbilt
8fbc8579f2 Allow zone information to be omitted from timestamp strings 2021-02-11 14:26:55 -05:00
Jay Berkenbilt
df067c9ab6 Add autoconf test for localtime_r 2021-02-11 14:26:55 -05:00
Jay Berkenbilt
2538d84413 Explicitly deprecate old name/number tree constructors
Use C++14 [[deprecated]] tag
2021-02-10 16:28:00 -05:00
Jay Berkenbilt
1b3f84f967 Require C++14 instead of C++11 2021-02-10 16:27:58 -05:00
Jay Berkenbilt
9fcf61b2f6 Fix loop in QPDFOutlineDocumentHelper (fuzz issue 30507) 2021-02-10 16:27:44 -05:00
Jay Berkenbilt
4d1f2fdcac Update to new name/number tree API 2021-02-10 15:46:20 -05:00
Jay Berkenbilt
accb891b4f Add attachment information to the json output 2021-02-10 15:46:18 -05:00
Jay Berkenbilt
832d792e4e Add CLI support for working with attachments 2021-02-10 10:03:27 -05:00
Jay Berkenbilt
1f4771cd0d Minor clean up of Windows headers 2021-02-10 07:36:18 -05:00
Jay Berkenbilt
ad34b9c278 Implement helpers for file attachments 2021-02-10 06:57:37 -05:00
Jay Berkenbilt
bf0e6eb302 Add QUtil methods for dealing with PDF timestamp strings 2021-02-09 17:50:24 -05:00
Jay Berkenbilt
bfbeec5497 Make newly created name/number trees indirect objects 2021-02-08 06:49:56 -05:00
Jay Berkenbilt
553ac7f353 Add QUtil::pipe_file and QUtil::file_provider 2021-02-07 19:41:34 -05:00
Jay Berkenbilt
efdd46da51 TODO: more changes for next ABI update 2021-02-07 19:41:34 -05:00
Jay Berkenbilt
e076c9bf08 Remove erroneous handling of /EFF for stream decryption
I thought /EFF was supposed to be used as a default for decrypting
embedded file streams, but actually it's supposed to be advice to a
conforming writer about handling new ones. This makes sense since the
findAttachmentStreams code, which is not actually needed, was never
right.
2021-02-06 17:08:41 -05:00
Jay Berkenbilt
ac2b3b96e1 Make wrong object stream type a warning 2021-02-06 14:29:11 -05:00
Jay Berkenbilt
af557db4a4 Cosmetic fix to help 2021-02-06 13:45:43 -05:00
Jay Berkenbilt
15c17e58a2 TODO: add note about issue 476 with broken files 2021-02-05 05:17:12 -05:00
Jay Berkenbilt
3de67173de Better fix to insecure password check (fixes #501) 2021-02-04 20:44:05 -05:00
Jay Berkenbilt
63158cf546 Add --password-file=filename option (fixes #499) 2021-02-04 16:48:53 -05:00
Jay Berkenbilt
21b0f4acfc Require --allow-insecure to create certain encrypted files (fixes #501)
For now, --allow-insecure allows creation of files with the owner
passwords empty or matching the user password.
2021-02-04 15:57:13 -05:00
Jay Berkenbilt
faa2e3ddfd Handle older PDFs whose form XObjects inherit resources (fixes #494)
When removing unreferenced resources, notice if a page (recursively)
contains a form XObject with unreferenced resources, and count any
such resources as referenced by the page.
2021-02-02 18:06:05 -05:00
Jay Berkenbilt
81025e4998 Refactor removal of unreferenced resources
Refactor in preparation for resolving unresolved resources in form
xobjects from page.
2021-02-02 18:06:05 -05:00
Jay Berkenbilt
5fdf37b1ba Handle warnings in --pages from other files
Warnings were not being handled per --no-warn or generating exit code 3.
2021-02-02 18:06:05 -05:00
Jay Berkenbilt
2046f6536d Add release note for previous fix 2021-02-02 18:06:05 -05:00
Jay Berkenbilt
9c9ce64eec Handle strings in inline image dictionaries
We need to use token.getRawValue, not token.getValue
2021-01-31 07:50:03 -05:00
Jay Berkenbilt
178f995fc2 Recover from exceptions during filtering for inline images 2021-01-31 07:49:08 -05:00
Jay Berkenbilt
4ae93a73c5 Improve memory safety of dict/array iterators 2021-01-31 07:16:03 -05:00
Jay Berkenbilt
1fec40454e Add example of name/number trees and dictionary/array iteration 2021-01-30 15:52:16 -05:00
Jay Berkenbilt
ce19ec5c4b Update examples to use QPDFObjectHandle iterators 2021-01-30 15:15:24 -05:00
Jay Berkenbilt
de0b11fc47 Add C++ iterator API around array and dictionary objects 2021-01-30 15:15:23 -05:00
Jay Berkenbilt
35e7859bc7 Make QPDFObjectHandle::is* return false for uninitialized objects 2021-01-29 15:46:54 -05:00
Jay Berkenbilt
50decc9bb8 name/number tree: explicitly declare default destructors 2021-01-29 15:46:54 -05:00
Jay Berkenbilt
4f103c6182 TODO note about sanitizer 2021-01-27 08:54:27 -05:00
Jay Berkenbilt
8ed3e8c79b NNTree: rework iterators to be more memory efficient
Keep a std::pair internal to the iterators so that operator* can
return a reference and operator-> can work, and each can work without
copying pairs of objects around.
2021-01-26 09:12:23 -05:00
Jay Berkenbilt
e7e20772ed name/number trees: remove 2021-01-26 09:12:23 -05:00
Jay Berkenbilt
5816fb44b8 name/number trees: insertAfter 2021-01-25 15:39:10 -05:00
Jay Berkenbilt
16a9bb3f6f name/number trees: newEmpty, increment/decrement end() 2021-01-25 15:39:10 -05:00
Jay Berkenbilt
b5614f611d Implement repair and insert for name/number trees 2021-01-24 19:31:45 -05:00
Jay Berkenbilt
04edfe9fad QPDFObjectHandle::newUnicodeString to uses UTF-16 only when needed
Use the first of ASCII, PDFDocEncoding, or UTF-16 that is capable of
encoding the string.
2021-01-24 03:27:28 -05:00
Jay Berkenbilt
63e5cb533d Use new QPDF{Name,Number}TreeObjectHelper API 2021-01-24 03:27:28 -05:00
Jay Berkenbilt
d61ffb65d0 Add new constructors for name/number tree helpers
Add constructors that take a QPDF object so we can issue warnings and
create new indirect objects.
2021-01-24 03:27:26 -05:00
Jay Berkenbilt
ba814703fb Use QPDFNameTreeObjectHelper's iterator directly 2021-01-24 03:25:11 -05:00
Jay Berkenbilt
5f0708418a Add iterators to name/number tree helpers 2021-01-24 03:22:59 -05:00
Jay Berkenbilt
4a1cce0a47 Reimplement name and number tree object helpers
Create a computationally and memory efficient implementation of name
and number trees that does binary searches as intended by the data
structure rather than loading into a map, which can use a great deal
of memory and can be very slow.
2021-01-24 03:22:51 -05:00
Jay Berkenbilt
9ad6cfd45b Clarify qpdf_register_progress_reporter's comment 2021-01-19 08:55:23 -05:00
Jay Berkenbilt
ad2c2b8452 Note about debian package in README-maintainer 2021-01-19 08:55:23 -05:00
Jay Berkenbilt
6226b69dba Add warn() to QPDF's public API 2021-01-16 18:41:53 -05:00
Jay Berkenbilt
fc88837d4b Treat /EmbeddedFiles as a proper name tree
If we ever had an encrypted file with different filters for
attachments and either the /EmbeddedFiles name tree was deep or some
of the file specs didn't have /Type, we would have overlooked those as
attachment streams. The code now properly handles /EmbeddedFiles as a
name tree.
2021-01-11 10:50:44 -05:00