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

915 Commits

Author SHA1 Message Date
Jay Berkenbilt
9fc02e2f91 Add another string parsing test 2023-10-14 17:31:54 -04: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
dc863a10b2 Change test output file from out.pdf to a.pdf for cleanup
The cleanup() method automatically removes certain files, but not
out.pdf. Using a.pdf prevents the file from being left behind after
the tests run.
2023-09-03 14:16:33 -04: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
290a672141 Add test cases for fix-qpdf from pipe 2023-09-02 17:28:23 -04: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
Jay Berkenbilt
0b538ec877
Merge pull request #982 from m-holger/cltidy
Apply various Clang-Tidy rules
2023-06-17 11:29:21 -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
d784e8033c Code tidy - Clang-Tidy rule performance-for-range-copy 2023-06-09 15:55:49 +01:00
m-holger
0ac005f0d9 Code tidy - Clang-Tidy rule modernize-use-override 2023-06-09 15:52:56 +01:00
m-holger
5906dd5c1f Code tidy - Clang-Tidy rule modernize-use-default-member-init 2023-06-09 15:43:21 +01:00
m-holger
4490d4c35e Avoid unnecessary copying of stream dictionary in QPDF::readObject 2023-06-05 21:22:40 +01:00
Jay Berkenbilt
cfcf4318b2 Don't check sizes for old version
Otherwise we get errors if we added a class.
2023-05-21 14:42:29 -04:00
Jay Berkenbilt
60965d5f4d Rerun clang-format 2023-05-21 13:35:09 -04: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
Jay Berkenbilt
d740c6ccce Rerun format_code (after merging clang-tidy PR) 2023-05-20 14:52:19 -04:00
m-holger
41ec7eda54 Use auto when initialializing with new 2023-05-20 15:41:40 +01:00
m-holger
d0682f0f60 Use nullptr instead of 0 or NULL 2023-05-20 15:41:36 +01:00
m-holger
e28f4efb00 Replace deprecated C++ includes 2023-05-20 15:41:25 +01:00
m-holger
7f043fe88e Remove unused include directives 2023-05-20 15:37:41 +01: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
Jay Berkenbilt
fe36ef141c
Merge pull request #924 from cdosborn/main
Improve --optimize-images to find images nested within XObjects
2023-03-18 15:34:27 -04:00
Jay Berkenbilt
1e53da74bc
Merge pull request #918 from m-holger/fixqdf
Code tidy QdfFixer methods
2023-03-18 14:00:11 -04: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
m-holger
cfcceff6aa Replace std::regex_search with string_view methods in QdfFixer::processLines 2023-03-09 12:16:33 +00:00
m-holger
011b1d7e3a Use std::string_view in QdfFixer::processLines
Change type of local var lines to string_view. Also, instead of
constructing a list of lines, read the entire input into a single string
and break it up into lines on the fly.stash
2023-03-09 11:44:26 +00:00
m-holger
82efe52b7d Tidy QdfFixer::adjustOstreamXref 2023-03-08 10:00:17 +00:00
m-holger
fc828c2a50 Tidy QdfFixer::checkObjId 2023-03-08 09:56:53 +00:00
m-holger
71bba5d40d Code tidy QdfFixer::writeBinary 2023-03-08 09:50:49 +00: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