2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-10 23:20:58 +00:00
Commit Graph

556 Commits

Author SHA1 Message Date
Jay Berkenbilt
cff26040d8 Using insecure crytpo from the CLI is now an error by default 2022-04-30 17:23:58 -04:00
Jay Berkenbilt
0122f44865 TODO: remove a few discarded API change ideas
I had some ideas about some more convenience methods from discussions
with some developers, but I decided that the newly added ones cover
most of the use cases. The other ideas were too hard to explain
clearly and therefore too specialized to put into the public API,
where I would have to support them for a long time.
2022-04-30 13:30:53 -04:00
Jay Berkenbilt
e80fad86e9 Add new QPDFObjectHandle methods for more fluent programming 2022-04-29 20:09:10 -04:00
Jay Berkenbilt
ff73d71ec8 Fix TODO typos 2022-04-29 19:06:27 -04:00
Jay Berkenbilt
68e721981a Add new QPDF::warn that takes most of QPDFExc's arguments 2022-04-23 18:25:43 -04:00
Jay Berkenbilt
696ca53205 TODO note about default output streams for QPDFJob 2022-04-23 18:25:43 -04:00
Jay Berkenbilt
22b35c4928 Expose QUtil::get_next_utf8_codepoint 2022-04-23 18:25:43 -04:00
Jay Berkenbilt
5bbb0d4c30 Replace switch statements with static map initializers
Character transcoding from Unicode to single-byte characters used
hard-coded switch statements because the code predated our adoption of
C++11. Now we have thread-safe, static initialization of map literals,
so use that instead.
2022-04-23 18:25:43 -04:00
Jay Berkenbilt
877694a583 Decide against adding handleWarning back to ParserCallbacks 2022-04-16 13:41:53 -04:00
Jay Berkenbilt
75fe4f60c3 Use anonymous namespaces for file-private classes 2022-04-16 13:35:27 -04:00
Jay Berkenbilt
38edca820e Clarify note in TODO 2022-04-16 13:16:06 -04:00
Jay Berkenbilt
80ed3076a0 Remove deprecated name/number tree constructors
Remove the name/number tree object helper constructors that don't take
a QPDF&.
2022-04-16 13:13:15 -04:00
Jay Berkenbilt
6df6260751 Change default --json from 1 to latest 2022-04-16 12:57:33 -04:00
Jay Berkenbilt
cdd0b4fb7d Use = default and = delete where possible in classes 2022-04-16 11:39:14 -04:00
Jay Berkenbilt
2a7d2b63c2 Make ABI-breaking changes that don't modify API at all
* Merge overloaded functions by adding default values
* Remove non-const methods that are identical to const methods
2022-04-16 10:41:46 -04:00
Jay Berkenbilt
dd35966367 Remove remaining cmake steps from TODO 2022-04-10 17:57:26 -04:00
Jay Berkenbilt
5f4675bb24 Mark non-ABI symbols in exported class with QPDF_DLL_PRIVATE 2022-04-10 16:54:23 -04:00
Jay Berkenbilt
90cfe80bac Clean up/fix DLL.h
* Change DLL_EXPORT to libqpdf_EXPORTS (internal to the build). The
  new name is cmake's default, is more conventional, and is less
  likely to clash with other symbols.
* Add QPDF_DLL_PRIVATE for non-Windows
* Make logic around when to define QPDF_DLL et al more explicit
* Add detailed comments
2022-04-10 16:52:36 -04:00
Jay Berkenbilt
07edf96440 Remove methods of private classes from ABI
Prior to the cmake conversion, several private classes had methods
that were exported into the shared library so they could be tested
with libtests. With cmake, we build libtests using an object library,
so this is no longer necessary. The methods that are disappearing from
the ABI were never exposed through public headers, so no code should
be using them. Removal had to wait until the window for ABI-breaking
changes was open.
2022-04-09 17:33:29 -04:00
Jay Berkenbilt
c7e877b88b Update documentation for PointerHolder transition 2022-04-09 17:33:29 -04:00
Jay Berkenbilt
59834db472 Add documentation for code formatting and contribution guidelines 2022-04-09 12:25:08 -04:00
Jay Berkenbilt
2e41b805bd Update TODO with additional notes 2022-04-05 14:56:19 -04:00
Jay Berkenbilt
77e889495f Update some code manually to get better formatting results
Add comments to force line breaks, parenthesize function arguments
that are contatenated strings, etc. -- these kinds of changes improve
clang-format's results and also cause emacs cc-mode to match
clang-format. After this type of change, most of the time, when
clang-format and emacs disagree, clang-format is better.
2022-04-05 14:56:19 -04:00
Jay Berkenbilt
f20fa61eb4 Add .clang-format and .dir-locals.el files to set coding style
Configure emacs and clang-format 15 to the coding style I am choosing
for qpdf.
2022-04-04 08:10:40 -04:00
Jay Berkenbilt
80801e4c56 TODO note 2022-04-03 17:58:34 -04:00
Jay Berkenbilt
198b96471a Notes for next release 2022-03-19 08:57:47 -04:00
Jay Berkenbilt
11e34f29ce TODO: update section for cmake 2022-03-18 19:53:18 -04:00
Jay Berkenbilt
96839decd0 TODO note about linux32 large file tests 2022-03-18 19:53:18 -04:00
Jay Berkenbilt
f58d2a60d5 Update build-related documentation and comments 2022-03-18 19:53:18 -04:00
Jay Berkenbilt
064a90da2d TODO: update cmake notes 2022-03-08 11:55:59 -05:00
Jay Berkenbilt
584793ea1e Spell check, update release notes for 10.6.3 2022-03-07 18:22:34 -05:00
Jay Berkenbilt
066efb69ae TODO: cmake updates 2022-03-07 10:07:27 -05:00
Jay Berkenbilt
c0fc776ba4 TODO: notes for cmake migration 2022-03-01 15:00:29 -05:00
Jay Berkenbilt
6dd8465948 TODO: solidify plans for code formatting 2022-02-26 12:08:58 -05:00
Jay Berkenbilt
a531418964 TODO: more planning 2022-02-26 07:39:33 -05:00
Jay Berkenbilt
905e99a314 TODO: flesh out JSON v2 details 2022-02-25 14:54:25 -05:00
Jay Berkenbilt
e7ecc348f9 TODO: clarify fluent interfaces for QPDFObjectHandle 2022-02-25 11:24:56 -05:00
Jay Berkenbilt
f7ac591590 Recognize explicit UTF-8 strings (fixes #654) 2022-02-22 08:10:05 -05:00
Jay Berkenbilt
07a2bb332d Add documentation and release notes around 0 Tf issue 2022-02-22 08:10:05 -05:00
Jay Berkenbilt
332cb76dd0 TODO: cmake for qpdf 11 2022-02-18 16:41:58 -05:00
Jay Berkenbilt
f91b21c7d4 Preserve input PDF version on pages/split-pages (fixes #610) 2022-02-08 12:34:14 -05:00
Jay Berkenbilt
dd4f30226f Rework PointerHolder transition to make it smoother
* Don't surprise people with deprecation warnings
* Provide detailed instructions and support for the transition
2022-02-07 17:38:20 -05:00
Jay Berkenbilt
cfaae47dc6 Add getBufferSharedPointer() to Pl_Buffer and QPDFWriter 2022-02-07 12:53:28 -05:00
Jay Berkenbilt
b3bf02904a TODO: cleanup 2022-02-05 16:07:17 -05:00
Jay Berkenbilt
eb481eb698 Prepare release notes for 10.6 (so far) 2022-02-05 15:41:22 -05:00
Jay Berkenbilt
dd3b2cedd3 Update ChangeLog for contributions from m-holger 2022-02-05 11:29:25 -05:00
Jay Berkenbilt
2e476e189a Remove stray TODO item 2022-02-05 11:29:25 -05:00
Jay Berkenbilt
7fb22740e1 Add operator ""_qpdf for creating QPDFObjectHandle literals 2022-02-05 11:29:25 -05:00
Jay Berkenbilt
b48a0ff0e8 Add qpdf_empty_pdf to C API 2022-02-05 11:29:25 -05:00
Jay Berkenbilt
5f3f78822b Improve use of std::unique_ptr
* Use unique_ptr in place of shared_ptr in some cases
* unique_ptr for arrays does not require a custom deleter
* use std::make_unique (c++14) where possible
2022-02-05 11:24:56 -05:00
Jay Berkenbilt
88c3d556d5 Spell check 2022-02-05 11:24:56 -05:00
Jay Berkenbilt
e782d5e951 TODO: update notes about PointerHolder 2022-02-05 11:24:56 -05:00
Jay Berkenbilt
2abb305565 TODO 2022-02-04 13:41:05 -05:00
Jay Berkenbilt
8eab616d62 Add qpdf version macros to qpdf/DLL.h 2022-02-04 13:41:01 -05:00
Jay Berkenbilt
8b67ac494e TODO: add notes on json v2 and other post-QPDFJob activities/ideas 2022-02-04 13:12:37 -05:00
Jay Berkenbilt
2fd5a43f67 Add ChangeLog entries for refactoring work 2022-02-01 17:17:05 -05:00
Jay Berkenbilt
9e3b321b24 TODO note 2022-01-31 15:57:45 -05:00
Jay Berkenbilt
764feb0f8e TODO note 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
59b775104a TODO note 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
4e9da59eac TODO note 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
558ba2823e TODO note about debian package and docs 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
a218ed488d TODO notes 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
3d2d75cfa4 TODO reminder about table wrapping patch 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
e8e8f6f43c Add JSON::parse 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
c8729398dd Generate help content from manual
This is a massive rewrite of the help text and cli.rst section of the
manual. All command-line flags now have their own help and are
specifically index. qpdf --help is completely redone.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
2c29a039cb TODO 2022-01-30 13:11:02 -05:00
Jay Berkenbilt
32f7d9989a TODO: ABI note 2022-01-05 18:13:25 -05:00
Jay Berkenbilt
5b6cf45f83 Cleanup TODO 2021-12-21 17:26:05 -05:00
Jay Berkenbilt
cf7b2b5700 test_driver: split runtest into separate functions
Too bad about git annotate but it was pretty crazy to have all those
test cases together like that.
2021-12-20 12:40:03 -05:00
Jay Berkenbilt
c1e2b64a3f TODO cleanup 2021-12-20 11:45:20 -05:00
Jay Berkenbilt
038dd2d5ee Remove uninitialized error idea
QPDFObjectHandle gets copied a lot, so let's not add another field.
For performance reasons, QPDFObjectHandle does not indirect through a
smart pointer, so this would also be an ABI change.
2021-12-20 11:34:00 -05:00
Jay Berkenbilt
d25eb29610 Update maintainer notes for doc changes 2021-12-19 16:53:37 -05:00
Jay Berkenbilt
e8a15204f5 Integration with readthedocs 2021-12-18 15:44:54 -05:00
Jay Berkenbilt
426b4ce856 Update documentation build/installation 2021-12-18 12:20:56 -05:00
Jay Berkenbilt
10fb619d3e Split documentation into multiple pages, change theme 2021-12-18 11:05:51 -05:00
Jay Berkenbilt
cce715cd0e TODO: spell check 2021-12-17 12:38:52 -05:00
Jay Berkenbilt
addd6bef95 TODO: documentation updates 2021-12-15 14:29:58 -05:00
Jay Berkenbilt
61f52cb6ac Update release-notes link 2021-12-13 11:20:14 -05:00
Jay Berkenbilt
2f938d4f13 Work old "upgrading" sections into the release notes
These are for ancient versions.
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
aaea245a8d Remove "Indices and tables"
This was inserted by sphinx-quickstart, but it doesn't do anything for us.
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
e10e787413 Explicitly mark perl codeblock as such 2021-12-13 11:20:14 -05:00
Jay Berkenbilt
cac844e07a Replace xref links to :ref:
Pandoc doesn't convert <xref> correctly, but it does so consistently,
so this commit just changes all xref links to :ref:.
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
1b55906a04 Replace <firstterm> with emphasis
At one time, it seems that I was starting to use the <firstterm>
feature of docbook, but I forgot about it long ago, and there is
nothing consistent. In the absence of an actual glossary, just use
emphasis for terminology and don't tag it in any special way. This
could be fixed later if we wanted to.
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
e5a7d9323f Convert the original xml comment to an rst comment 2021-12-13 11:20:14 -05:00
Jay Berkenbilt
d13a6032e6 Replace <replaceable> with {...}
All occurrences are in :file: or :samp: now.
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
0fdbb957a0 Wrap remaining replaceables in :samp: 2021-12-13 11:20:14 -05:00
Jay Berkenbilt
bf4d107853 Convert <option> to :samp: and clean up literal blocks
:option: is stronger and assumes a reference to a list of options.
Since we don't have that yet, just use :samp: for options. Inside
literal code blocks, there is no expansion, so just remove markup.
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
b764ba95ed Replace things previously marked with <filename> with :file:... 2021-12-13 11:20:14 -05:00
Jay Berkenbilt
15b87d769e Replace command|application with :command:...
Replace @1@...@2@ stuff from prior to the conversion with new
representation.
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
a372a988fd Switch build from docbook manual to sphinx
Also remove linearization from qpdf-manual.pdf. It's a small file, and
removing the dependency on the qpdf executable significantly shortens
build times.
2021-12-13 11:16:21 -05:00
Jay Berkenbilt
9a5d16a403 Prepare for docbook -> rst: replace SGML entitles
We were using SGML entities for various non-ASCII characters so they
could convert properly for both HTML and print, but this is no longer
necessary as we move from docbook to RST, so just replace them. Note
that the conversions done by sphinx automatically handle "smart
quotes", so it works to just use regular quotes in place of &LDQUO;
and &RDQUO;.
2021-12-12 16:29:13 -05:00
Jay Berkenbilt
f721fed9d6 doc: Replace Gajic with Gajić (finally)
With docbook, this was not converted properly in the PDF version, but
since we are moving out of docbook, we can just put the Unicode
character in the source.
2021-12-12 16:29:13 -05:00
Jay Berkenbilt
e5c2bd8b14 TODO: doc conversion notes
Make a list of things that need to be done while converting docbook to
sphinx/rst.
2021-12-12 16:29:13 -05:00
Jay Berkenbilt
29384ecace TODO 2021-12-12 14:58:22 -05:00
Jay Berkenbilt
c5708e9180 Update ABI note about fluent interfaces 2021-12-09 10:33:31 -05:00
Jay Berkenbilt
8acb79fc5e Remove notes on safe QPDFObjectHandle -- not worth doing
The impact on the code would be extremely high, and using it would
clutter the code greatly because it would break chaining like
a.getKey("/B").getKey("/C"). There are better ways to deal with the
issue.
2021-12-09 10:33:31 -05:00
Jay Berkenbilt
bef2c2222a C API: qpdf_get_last_string_length 2021-12-09 10:33:31 -05:00
Jay Berkenbilt
67b0dbe65f Note about C API enhancement for string length 2021-11-23 16:01:03 -05:00
Jay Berkenbilt
52d6fcf1de Notes on possible safe QPDFObjectHandle 2021-11-22 17:56:20 -05:00
Jay Berkenbilt
a63623adce Update notes on API changes for weak crypto 2021-11-19 15:20:12 -05:00
Jay Berkenbilt
750aca5b94 First increment of improving handling of weak crypto (fixes #358) 2021-11-11 12:24:15 -05:00
Jay Berkenbilt
5eac6c500c TODO: update fuzz case information 2021-11-04 14:03:24 -04:00
Jay Berkenbilt
a6b0e832a9 TODO: documentation suggestion 2021-09-10 10:52:21 -04:00
Jay Berkenbilt
30ac51bc78 Exclude unreferenced objects in object streams (fixes #520) 2021-05-08 09:42:09 -04:00
Jay Berkenbilt
8971443e46 QPDF::addPage*: handle duplicate pages more robustly 2021-04-05 10:58:10 -04:00
Jay Berkenbilt
2957e9b731 Note on fuzz case 2021-03-27 09:18:36 -04:00
Jay Berkenbilt
a77f58142d Remove some assertions that are not necessarily true (fixes #514)
Operations that add the same object to multiple places in the pages
tree are throwing exceptions and then later causing assertion
failures. The assert calls shouldn't be there.
2021-03-21 19:35:23 -04:00
Jay Berkenbilt
fb16c546b5 TODO: Comment about making making indirect objects 2021-03-11 12:53:09 -05:00
Jay Berkenbilt
d9cb2658d1 TODO: more notes on document-level work 2021-03-05 06:15:48 -05:00
Jay Berkenbilt
0b77f2cf26 Revert non-binary-compatible handleWarning change -- see TODO (ABI) 2021-03-04 15:59:46 -05:00
Jay Berkenbilt
c46137432e TODO notes about text appearance streams 2021-03-04 15:08:36 -05:00
Jay Berkenbilt
e17585c2d2 Remove unreferenced: ignore names that are not Fonts or XObjects
Converted ResourceFinder to ParserCallbacks so we can better detect
the name that precedes various operators and use the operators to sort
the names into resource types. This enables us to be smarter about
detecting unreferenced resources in pages and also sets the stage for
reconciling differences in /DR across documents.
2021-03-03 17:05:49 -05:00
Jay Berkenbilt
5207c3da71 TODO note about document-level work 2021-03-03 15:16:46 -05:00
Jay Berkenbilt
1886673d7e Spell check 2021-02-23 10:38:05 -05:00
Jay Berkenbilt
1e4c1be267 TODO: notes about document-level work 2021-02-23 10:38:05 -05:00
Jay Berkenbilt
d86a4faeeb TODO: add note about updating fuzzer tests 2021-02-22 18:42:06 -05:00
Jay Berkenbilt
aa848126cb Comment about QPDFMatrix and QPDFObjectHandle::Matrix 2021-02-21 08:06:19 -05:00
Jay Berkenbilt
3aefdd18a6 TODO: ABI note 2021-02-20 17:52:40 -05:00
Jay Berkenbilt
f21e4f264a Add file attachment example 2021-02-18 09:59:03 -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
15c17e58a2 TODO: add note about issue 476 with broken files 2021-02-05 05:17:12 -05:00
Jay Berkenbilt
4f103c6182 TODO note about sanitizer 2021-01-27 08:54:27 -05:00
Jay Berkenbilt
b5614f611d Implement repair and insert for name/number trees 2021-01-24 19:31:45 -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
891751f618 Remove unreferenced resources only from relevant pages 2021-01-04 15:17:35 -05:00
Jay Berkenbilt
a9bdeeb0e0 Fix zsh completion arguments (fixes #473) 2021-01-04 15:17:35 -05:00
Jay Berkenbilt
f0caf5e22d TODO: remove items I decided not to do 2021-01-04 12:00:21 -05:00
Jay Berkenbilt
98da4fd835 Externalize inline images now includes form XObjects 2021-01-02 14:08:17 -05:00
Jay Berkenbilt
bedf35d6a5 Bug fix: avoid extraneous pipeline finish calls with multiple contents
Avoid calling finish() multiple times on the pipeline passed to
pipeContentStreams. This commit also fixes a bug in which qpdf was not
exiting with the proper exit status if warnings found while splitting
pages; this was exposed by a test case that changed.
2021-01-02 14:08:17 -05:00
Jay Berkenbilt
a139d2b36d Add several methods for working with form XObjects (fixes #436)
Make some more methods in QPDFPageObjectHelper work with form
XObjects, provide forEach methods to walk through nested form
XObjects, possibly recursively. This should make it easier to work
with form XObjects from user code.
2021-01-02 12:29:31 -05:00
Jay Berkenbilt
c9271335fa Add QPDFPageObjectHelper::flattenRotation and --flatten-rotation 2020-12-30 13:03:55 -05:00
Jay Berkenbilt
78c49824eb TODO updates 2020-12-28 13:03:04 -05:00
Jay Berkenbilt
d4d7630cf5 Add pdf-custom-filter example 2020-12-28 13:03:04 -05:00
Jay Berkenbilt
39bfa01307 Implement user-provided stream filters
Refactor QPDF_Stream to use stream filter classes to handle supported
stream filters as well.
2020-12-28 12:58:19 -05:00
Jay Berkenbilt
0675a3f61a Decide not to allow stream data providers to modify dictionary 2020-12-26 08:48:20 -05:00
Jay Berkenbilt
cc8895078a Add QPDFObjectHandle::makeDirect(bool allow_streams) 2020-12-26 08:48:18 -05:00
Jay Berkenbilt
52e07c813c TODO: remove item I'm not fixing 2020-10-31 13:41:08 -04:00
Jay Berkenbilt
54759cbf63 Remove C++-11 notes from TODO 2020-10-27 18:07:07 -04:00
Jay Berkenbilt
bcea54fcaa Revert removal of unreadCh change for performance
Turns out unreadCh is much more efficient than seek(-1, SEEK_CUR).
Update comments and code to reflect this.
2020-10-27 11:57:48 -04:00
Jay Berkenbilt
81d2c548dc Spell check 2020-10-26 19:42:46 -04:00
Jay Berkenbilt
bc9c80dbe0 Add some missing ChangeLog entries 2020-10-26 11:51:33 -04:00
Jay Berkenbilt
4e8d21d849 Build Windows releases with openssl; automate external libraries
External libraries for Windows are now built automatically in the
qpdf/external-libs repository and include openssl in addition to zlib
and jpeg. Use these, and update the Windows build to build with the
openssl crypto provider by default. We leave the native crypto
provider enabled in case there is a problem with openssl and also to
continue to exercise that code.
2020-10-25 18:06:16 -04:00
Jay Berkenbilt
fd13fe74ef TODO and comments item for pipeContentStreams 2020-10-23 16:53:58 -04:00
Jay Berkenbilt
e3248a8cd1 Update fuzz issue list 2020-10-23 11:08:44 -04:00
Jay Berkenbilt
b30deaeeab Avoid merging adjacent tokens when concatenating contents (fixes #444) 2020-10-23 08:00:04 -04:00
Jay Berkenbilt
8a11feacc3 Avoid leak by resolving object streams more than once (fuzz issue 23642) 2020-10-22 15:39:36 -04:00
Jay Berkenbilt
c1684eae91 Check for overflow in page labels (fuzz issue 23599) 2020-10-22 05:49:24 -04:00
Jay Berkenbilt
24196c08cb Fix loop detection error (fuzz issue 23172) 2020-10-22 05:48:35 -04:00
Jay Berkenbilt
956c8f6432 Obscure bug fix copying foreign streams in special cases (fixes #449)
Specifically, if a stream had its stream data replaced and had
indirect /Filter or /DecodeParms, it would result in non-silent loss
of data and/or internal error.
2020-10-21 19:23:23 -04:00