2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-05 21:07:50 +00:00
Commit Graph

476 Commits

Author SHA1 Message Date
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
Jay Berkenbilt
395efdf8d7 Turn off azure pipelines, completing migration to GitHub Actions 2020-10-21 16:42:51 -04:00
Jay Berkenbilt
98f6c00dad Protect numeric conversion against user's locale (fixes #459) 2020-10-21 16:42:51 -04:00
Jay Berkenbilt
ef127001b3 Remove some fuzz files with Mal/PDFEx-H (fixes #460)
There isn't really an issue with these files causing a real problem,
but malware and virus checkers trip on them, and the value to leaving
them in the test suite is too low to be worth the hassle.
2020-10-21 14:44:20 -04:00
Jay Berkenbilt
35014727f7 Build on a schedule and use latest versions of runners 2020-10-21 14:20:11 -04:00
Jay Berkenbilt
deeface146 Add automated test for shell wildcard expansion
Wildcard expansion is different in Windows from non-Windows and
sometimes requires special link options to work. Add tests that fail
if we link incorrectly.
2020-10-21 14:15:31 -04:00
Jay Berkenbilt
cfafac8d13 Create a minimal Linux binary distribution (fixes #352)
This is suitable for use as a Lambda layer in AWS, inclusion in a
docker container, or other places where a minimal binary distribution
is desired.
2020-10-21 10:07:34 -04:00
Jay Berkenbilt
758e3e38f5 Add option --warning-exit-0 to exit 0 instead of 3 with warnings 2020-10-20 18:02:39 -04:00
Jay Berkenbilt
90217e6686 Fix another case of errors written to stdout (fixes #438) 2020-10-20 17:48:55 -04:00
Jay Berkenbilt
b868ea141d TODO: Build issues including Windows external libraries 2020-10-20 17:26:09 -04:00
Jay Berkenbilt
56d96e2260 Add --disable-rpath to configure (fixes #422) 2020-10-20 17:18:20 -04:00
Jay Berkenbilt
bed165c9fc Stop using InputSource::unreadCh 2020-10-18 07:43:05 -04:00
Jay Berkenbilt
1a888ee3b1 TODO 2020-10-16 20:25:12 -04:00
Jay Berkenbilt
a3677ffe91 TODO and ChangeLog updates from merged pull requests 2020-10-16 20:15:14 -04:00
Jay Berkenbilt
894d1c650c Minor notes on GitHub Actions migration 2020-10-16 17:52:43 -04:00
Jay Berkenbilt
92635d1203 Add GitHub Actions workflow 2020-10-16 17:34:21 -04:00
Jay Berkenbilt
18b34a5649 InputSource::unreadCh -- only unread most recently read character
This is all that ever worked. The test suite was trying to do
something different from ClosedFileInputSource.
2020-10-16 17:15:39 -04:00
Jay Berkenbilt
07909a62ed TODO: remove previously completed item 2020-10-15 15:27:49 -04:00
Jay Berkenbilt
7fbadba6cd Remove support for Travis CI
It is redundant with qpdf's main CI environment, which is Azure
Pipelines, but may soon be migrated to GitHub Actions.
2020-10-15 15:18:43 -04:00
Jay Berkenbilt
bbd45cd01c Clarify qpdf's exit statuses in the documentation 2020-10-15 15:03:14 -04:00
Jay Berkenbilt
8f1db4dcf2 Fix doc typo (--encryption-file-password) (fixes #468) 2020-10-15 14:54:34 -04:00
Jay Berkenbilt
a1994a5343 Fix/clarify documentation on --rotate option (fixes #470)
Make clear that you almost always want + or - before an angle when
specifying rotation.
2020-10-15 14:53:06 -04:00
Jay Berkenbilt
88b8f8ec86 Remove redundant check found by lgtm.com 2020-10-15 14:47:43 -04:00
Jay Berkenbilt
4d143d10eb TODO: organize in preparation for next increment 2020-10-15 14:10:21 -04:00
Jay Berkenbilt
22f7f459e6 Created PPA 2020-04-07 21:47:35 -04:00
Jay Berkenbilt
aec45e2c4f TODO: note about Windows builds 2020-04-06 11:23:02 -04:00
Jay Berkenbilt
893d38b87e Allow propagation of errors and retry through StreamDataProvider
StreamDataProvider::provideStreamData now has a rich enough API for it
to effectively proxy to pipeStreamData.
2020-04-05 20:07:13 -04:00
Jay Berkenbilt
a5367003c3 TODO: add analytics ideas 2020-04-04 18:08:40 -04:00
Jay Berkenbilt
144b2c8cbd Update list of open fuzz cases 2020-04-03 12:17:57 -04:00
Jay Berkenbilt
da1258e2e6 Update C++11 notes in TODO 2020-04-03 12:17:57 -04:00
Jay Berkenbilt
5806e5c60c QPDFPageObjectHelper::placeFormXObject: use std::string const& (fixes #374) 2020-04-03 12:17:57 -04:00
Jay Berkenbilt
cc755e37f7 Update TODO with notes on performance analysis 2020-04-03 12:16:24 -04:00
Jay Berkenbilt
676cdcff1a Spell check 2020-01-26 18:32:35 -05:00
Jay Berkenbilt
8ed4efedba Update fuzz notes 2020-01-26 18:29:11 -05:00
Jay Berkenbilt
49f4600dd6 TODO: Move lexical stuff and add detail 2020-01-13 09:18:36 -05:00
Jay Berkenbilt
0ae19c375e TODO: Remove fixed item, move item into ABI section 2019-12-30 09:18:02 -05:00
Jay Berkenbilt
021d71454a Spell check 2019-11-09 19:03:56 -05:00
Jay Berkenbilt
07da0039d3 Link with setargv or wsetargv with MSVC (fixes #224)
For wildcard expansion to work properly with the msvc binary, it is
necessary to link with setargv.obj or wsetargv.obj, depending on
whether wmain is in use.
2019-11-09 18:50:42 -05:00
Jay Berkenbilt
b997fa5343 Start list of ABI changes for qpdf 10 2019-11-09 12:33:15 -05:00
Jay Berkenbilt
1ee45458fc Update docs for crypto providers 2019-11-09 09:53:42 -05:00
Jay Berkenbilt
653ce3550d Require C++-11
Includes updates to m4/ax_cxx_compile_stdcxx.m4 to make it work with
msvc, which supports C++-11 with no flags but doesn't set __cplusplus
to a recent value.
2019-11-09 08:18:02 -05:00
Jay Berkenbilt
c590dbc38e Update list of ignored fuzzer tests
Removed ones that were fixed upstream, and added a new one, all from
the jpeg library.
2019-11-03 18:59:12 -05:00
Jay Berkenbilt
d5ecaea488 Update fuzz errors in TODO 2019-10-12 19:37:40 -04:00
Jay Berkenbilt
5ce287d6bb Remove reference to automatically closed fuzz issue 2019-09-17 19:52:42 -04:00
Jay Berkenbilt
00fd9b3e03 Update C++-11 notes 2019-08-30 18:36:44 -04:00
Jay Berkenbilt
bde44c18ef Notes about C++-11 for qpdf 10 2019-08-30 12:41:25 -04:00
Jay Berkenbilt
d4c41e2624 TODO: update notes on ignored fuzz cases 2019-08-28 23:06:57 -04:00
Jay Berkenbilt
89dacd8eba Array optimization fixes performance issues (fixes #305, #311) 2019-08-18 09:00:55 -04:00
Jay Berkenbilt
8d7db4732b TODO: add note to outlines 2019-07-13 21:35:14 -04:00
Jay Berkenbilt
43ff34b49c Update TODO 2019-06-23 14:57:10 -04:00
Jay Berkenbilt
0b45dfd3b1 TODO updates 2019-06-22 21:52:50 -04:00
Jay Berkenbilt
ed8166b21e TODO/README-maintainer cleanup 2019-06-22 12:02:39 -04:00
Jay Berkenbilt
658b5bb3be QPDFWriter: clean up overloaded functions
In a small number of cases, it makes sense to replace an overloaded
function with a function that takes a default argument. We can do this
now because we've already broken binary compatibility since the last
release.
2019-06-22 10:13:27 -04:00
Jay Berkenbilt
79f6b4823b Convert remaining public classes to use Members pattern
Have classes contain only a single private member of type
PointerHolder<Members>. This makes it safe to change the structure of
the Members class without breaking binary compatibility. Many of the
classes already follow this pattern quite successfully. This brings in
the rest of the class that are part of the public API.
2019-06-22 10:13:27 -04:00
Jay Berkenbilt
864a546af6 Build with -fvisibility=hidden when supported 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
45dac410b5 Remove broken QPDFTokenizer::expectInlineImage 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
25dd3c6750 Remove QPDF::copyForeignObject with unused parameter 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
c6cfd64503 Rename QUtil::strcasecmp to QUtil::str_compare_nocase (fixes #242) 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
bd8918fffc Fix up TODO for ABI changes 2019-06-21 22:29:31 -04:00
Jay Berkenbilt
b07ad6794e Fix bugs found by fuzz tests
* Several assertions in linearization were not always true; change
  them to run time errors
* Handle a few cases of uninitialized objects
* Handle pages with no contents when doing form operations
* Handle invalid page tree nodes when traversing pages
2019-06-21 17:56:24 -04:00
Jay Berkenbilt
2c81eec45e Re-enable fuzzer testing in Windows 2019-06-21 17:32:35 -04:00
Jay Berkenbilt
1763957cbc Remove integer type task from TODO 2019-06-21 13:17:45 -04:00
Jay Berkenbilt
bbabbc2076 TODO 2019-06-18 08:44:10 -04:00
Jay Berkenbilt
d263a0493a TODO 2019-06-12 14:53:44 -04:00
Jay Berkenbilt
e61ee88dd2 Provide link to public key file 2019-05-18 08:49:30 -04:00
Jay Berkenbilt
b9b7e34743 TODO 2019-05-16 17:20:59 -04:00
Jay Berkenbilt
03e27709f3 Improve Unicode filename testing
Remove dependency on the behavior of perl for reliable creation of
Unicode file names on Windows.
2019-04-27 20:37:33 -04:00
Jay Berkenbilt
a5a016cdd2 Revert preservations of outlines with --split-pages
The preservation of outlines didn't provide very useful behavior
anyway as it copied all outlines but most didn't work. This
implementation also caused a very significant performance hit and so
is being reverted until a proper solution can be coded. The eventual
solution will not be compatible with the reverted solution anyway, so
it's best not to leave this in.
2019-04-20 21:00:43 -04:00
Jay Berkenbilt
8ce3b53cea TODO: ABI note 2019-04-20 21:00:43 -04:00
Jay Berkenbilt
e6ba0dbf61 Note about -fvisibility 2019-04-20 21:00:43 -04:00
Jay Berkenbilt
d2260925f0 TODO: make it easier to find release signing key 2019-02-25 19:52:00 -05:00
Jay Berkenbilt
8acf636b4e Incorporate improved Windows fragility workaround from qtest 2019-02-01 22:25:25 -05:00
Jay Berkenbilt
d491ed8753 TODO 2019-01-31 22:02:26 -05:00
Jay Berkenbilt
0a470d2daf Don't optimize non-8-bit images
Also add test cases for additional coverage on image optimization.
2019-01-31 21:29:28 -05:00
Jay Berkenbilt
eb49e07c0a Make inline image token exactly contain the image data
Do not include the trailing EI, and handle cases where EI is not
preceded by a delimiter. Such cases have been seen in the wild.
2019-01-31 20:28:44 -05:00
Jay Berkenbilt
5211bcb5ea Externalize inline images (fixes #278) 2019-01-31 10:38:13 -05:00
Jay Berkenbilt
b776dcd2d3 Clean up some private functions 2019-01-29 22:14:20 -05:00
Jay Berkenbilt
2d0885bc11 Clarify documentation for copyForeignObject regarding pages
Make explicit that copyForeignObject can be used on page objects and
will copy them properly but not update the pages tree.
2019-01-28 21:53:55 -05:00
Jay Berkenbilt
2712869cf9 Fix logic for when to compress object and xref streams (fixes #271) 2019-01-28 21:43:06 -05:00
Jay Berkenbilt
9e01c8bd99 TODO 2019-01-28 20:12:43 -05:00
Jay Berkenbilt
54bd37e881 TODO 2019-01-27 09:30:40 -05:00