Jay Berkenbilt
4400ce84ee
Add "n:/pdf-name" to qpdf JSON for binary names ( fixes #1072 )
2023-12-21 17:43:29 -05:00
Jay Berkenbilt
b8fd18ae56
Merge branch 'parse_ref' into work
2023-12-21 15:43:50 -05:00
Jay Berkenbilt
4ee393d1fa
Remove compression from linearization tests where possible
...
By combining --linearize with --compress-streams=n, we ensure that no
new compressed data will appear in linearized output, which makes the
output independent of zlib's output. There are other tests to ensure
that linearization works correctly with compression. This commit
involves changing some test outputs and test code as well just
updating test suites.
2023-12-20 15:46:20 -05:00
Jay Berkenbilt
7e679ab8b6
Avoid depending on exact xref stream offsets
...
For the modified test case, we care about successful recovery, not
about the exact offsets. Add a filter to remove the specific numbers
from show-xref.
2023-12-20 15:46:20 -05:00
Jay Berkenbilt
d61612a2e5
Bug fix: don't compress hint streams when --compress-streams=n
2023-12-20 15:46:20 -05:00
Jay Berkenbilt
c5f622a09e
Bug fix: don't compress object/xref streams with --compress-streams=n
2023-12-20 15:46:20 -05:00
Jay Berkenbilt
a238b4b0fd
Ensure there is a meaningful deterministic ID test
...
If we ignore /ID[1], we need to make sure deterministic IDs are
tested properly.
2023-12-20 15:21:32 -05:00
m-holger
9146f1f0fd
Change default for SF_FlateLzwDecode::columns to 1
2023-11-23 01:51:38 +00:00
m-holger
605b1429e8
In QPDFParser::parse create dictionaries on the fly
...
Also, don't search for /Contents name unless the result is used.
2023-11-03 11:09:58 +00:00
m-holger
0328d87237
In QPDFParser::parse refactor parsing of indirect references
2023-11-03 01:34:16 +00:00
m-holger
172cc61305
Remove redundant code in QPDFParser::parse and parseRemainder
...
Also, fix test cases.
2023-11-03 01:26:34 +00:00
m-holger
26e0bf4610
In QPDFParser::parse refactor eof handling
2023-11-01 15:23:30 +00:00
Jay Berkenbilt
1ecc6bb29e
Don't lose character after \d or \dd parsing string ( fixes #1050 )
2023-10-14 17:12:56 -04:00
m-holger
fb504ce913
Fix #1028
2023-09-05 17:22:34 +01:00
Jay Berkenbilt
2b4dcb33aa
Merge pull request #1014 from m-holger/i1011
...
Change QPDF::copyForeignObject to return a null object when called wi…
2023-09-03 08:54:12 -04:00
m-holger
b0c3ea2bb6
Refactor test for /Pages object in QPDF::copyForeignObject
...
Test for missing object before accessing obj_copier.object_map.
2023-09-03 13:41:11 +01:00
m-holger
94e6323206
Fix exit code when an input other than the primary input generates warnings
2023-09-03 12:27:23 +01:00
m-holger
ca79fcb26e
Add test for attempts to copy foreign /Pages object
2023-09-03 10:50:06 +01:00
Jay Berkenbilt
c51bdeb19c
Merge pull request #1017 from m-holger/mbox
...
Check for missing mediaboxes
2023-09-02 15:03:03 -04:00
m-holger
ac32dbc313
Reserve foreign /Page objects in QPDF::copyForeignObject
...
Ensure that links to foreign pages are not broken provided that the page is
subsequently copied.
2023-08-25 14:06:42 +01:00
m-holger
9a69cbba5b
Check for missing mediaboxes
2023-07-29 13:16:40 +01:00
m-holger
2643ed4dd9
Add new private method QPDF::readTrailer()
2023-07-08 01:28:15 +01:00
Jay Berkenbilt
2ff7ac8a58
Merge pull request #990 from m-holger/issue600
...
Ensure copied annotations are fixed (fixes #600 )
2023-06-17 17:54:27 -04:00
m-holger
ae19d703f4
Ensure copied annotations are fixed ( fixes #600 )
...
Case where pages from a main input without /AcroForm key were duplicated
was omitted
2023-06-15 15:49:50 +01:00
m-holger
4490d4c35e
Avoid unnecessary copying of stream dictionary in QPDF::readObject
2023-06-05 21:22:40 +01:00
Jay Berkenbilt
293a2e52b3
Disregard appearance state when irrelevant ( fixes #949 )
...
If /AP is a dictionary of streams rather than a dictionary of
dictionaries, disregard /AS, which is supposed to point to a subkey of
one of the dictionaries. This fix prevents qpdf's annotation
flattening from discarding some annotations when /AS is erroneously
set.
2023-05-20 15:46:16 -04:00
m-holger
3f2ebf334b
Fix bug in QPDF_Name::normalizeName introduced in #891
...
'#' was omitted from the list of chars that need to be escaped.
2023-04-04 15:54:54 +01:00
m-holger
41f79bedbc
Add new functions qpdfjob_create_qpdf and qpdfjob_write_qpdf
2023-04-02 09:45:19 +01:00
m-holger
182c2480df
Refactor QPDF_Array::setItem and rename to setAt
2023-04-01 13:56:29 +01:00
m-holger
4d37389bef
Refactor QPDF_Array::eraseItem and rename to erase
2023-04-01 13:56:16 +01:00
m-holger
1bb23d0545
Refactor QPDF_Array::insertItem and rename to insert
2023-04-01 13:56:10 +01:00
Jay Berkenbilt
f89196b6c8
Merge pull request #814 from m-holger/check
...
Warn if catalog type entry is invalid (fixes #810 )
2023-03-20 06:59:47 -04:00
m-holger
d8acccd5c8
Warn if catalog type entry is invalid ( fixes #810 )
2023-03-19 20:07:53 +00:00
Connor Osborn
f6b13fcc05
Add test validating that images in nested XObjects are included in optimization
...
The sample file (nested-images.pdf) includes a pdf with an image that is
nested within an XObject within an XObject in the Resources dict of the
only page. These images were ignored in prior versions of qpdf.
2023-03-15 23:27:05 -04:00
Jay Berkenbilt
78f7dc9fe8
Overlay/underlay: capture origial page as form XObject ( fixes #904 )
2023-02-25 12:58:51 -05:00
Jay Berkenbilt
0f97e98203
Handle linearization warnings as proper warning ( fixes #851 )
2023-02-18 19:38:49 -05:00
m-holger
bb89a60320
Add data member JSONParser::token_start
2023-02-04 13:52:55 +00:00
Jay Berkenbilt
1308c45090
Implement --remove-restrictions ( fixes #833 )
2023-01-28 13:42:19 -05:00
Jay Berkenbilt
e4e0f40fc0
Fix annotations properly for page with no /Resources ( fixes #827 )
2023-01-09 07:31:39 -05:00
Jay Berkenbilt
bf477fbb96
Do double indirect test correctly
2023-01-01 07:33:34 -05:00
Jay Berkenbilt
ce8e63cb9a
Add test case for broken indirect object reference
...
...where the first "number" is an indirect object that happens to be a
number.
2022-12-31 15:12:58 -05:00
Jay Berkenbilt
19a8d3fea2
Add test case of dangling ref not found until xref reconstruction
2022-11-25 15:16:16 -05:00
Jay Berkenbilt
bd337b8055
Preserve unreferenced objects in dangling test
2022-11-25 15:16:16 -05:00
Jay Berkenbilt
f6367bbada
Dangling ref test: show new object ID
2022-11-25 15:16:16 -05:00
m-holger
b1eb1a9584
Refactor QPDFObjectHandle::copyObject1
2022-11-20 12:07:22 -05:00
Jay Berkenbilt
e9980efec8
Correctly handle reuse of xref stream ( fixes #809 )
2022-11-19 17:03:17 -05:00
Jay Berkenbilt
db6598b449
Attempt to test for QPDFNameTreeObjectHelper's vtable
...
It has disappeared from the DLL on Windows a few times.
2022-10-06 08:40:08 -04:00
Jay Berkenbilt
f4ca04cec1
Fix edge case in character encoding ( fixes #778 )
...
Avoid representing as PDF Doc encoding any string whose PDF Doc
encoding representation starts with a UTF-16 or UTF-8 marker.
2022-09-26 08:06:47 -04:00
Jay Berkenbilt
2394acf7a6
Remove explicit direct object check from getObject
...
An indirect object reference to 0, 0 is invalid. If it appears in the
file or is parsed from a string, the parser catches it. This check
would only be useful for someone explicitly calling getObject with 0,
0, and that would trigger an error during resolve().
2022-09-13 11:21:29 -04:00
Jay Berkenbilt
4963ce6a53
Remove obsolete LL_FMT check from build ( fixes #768 )
...
This was broken for cross-compilation and has probably been
unnecessary for several years now.
Also fix extraneous whitespace in related some tests.
2022-09-12 11:48:38 -04:00