2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-06 05:17:52 +00:00
Commit Graph

204 Commits

Author SHA1 Message Date
m-holger
02e89bbe47 Fix bug in QPDFWriter::preserveObjectStreams
Code failed to allow for QPDF::getCompressibleObjSet deleting objects
from the object cache in case of multiple entries for the same object id.

Add fuzz test case 68668.
2024-05-04 10:55:30 +01:00
m-holger
aa2e0d23f0 In QPDFWriter::writeLinearized use object table obj in call to getLinearizedParts 2024-03-08 10:41:24 +00:00
m-holger
97d78c75ff In QPDFWriter::writeLinearized use object table obj in call to optimize 2024-03-08 10:33:42 +00:00
m-holger
0df0d00c58 Add method QPDF::Writer::getCompressibleObjSet
Create set without creation of an intermediate vector.
2024-03-08 10:20:12 +00:00
m-holger
ae00ee6119 Replace QPDF::Writer::getObjectStreamData with getXRefTable 2024-03-08 10:10:31 +00:00
m-holger
ef3a8025fb In QPDFWriter replace map lenghts with ObjTable new_obj 2024-03-08 10:06:14 +00:00
m-holger
ccad589f7d In QPDFWriter replace map xref with new ObjTable new_obj 2024-03-08 10:05:57 +00:00
m-holger
47cf4e3a50 In QPDFWriter change object_stream_to_objects to a map of vectors. 2024-03-08 10:04:54 +00:00
m-holger
2fa93e79b4 In QPDFWriter replace map object_to_object_stream with ObjTable obj 2024-03-08 09:59:56 +00:00
m-holger
84e25919cb In QPDFWriter replace map obj_renumber_no_gen with ObjTable obj 2024-03-08 09:36:47 +00:00
m-holger
8791b5f8d0 In QPDFWriter replace map obj_renumber with a new object table obj 2024-03-08 09:36:22 +00: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
m-holger
3237ef70fb Add new method Pl_Buffer::getString 2023-11-18 16:34:17 +00: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
ae3642ce42 Code tidy - Clang-Tidy rule modernize-use-equals-default 2023-06-09 15:45:14 +01:00
m-holger
d8e078fbb7 Remove redundant loop in QPDFWriter::prepareFileForWrite 2023-06-09 15:29:16 +01:00
m-holger
acd0acf169 Fix doc typos 2023-06-02 19:24:12 +01:00
m-holger
3c5700c255 Code tidy - reflow comments and strings 2023-06-02 16:00:40 +01:00
Jay Berkenbilt
60965d5f4d Rerun clang-format 2023-05-21 13:35:09 -04:00
m-holger
85d784952f Globally replace 'this->m->' with 'm->'
Using search and replace.
2023-05-21 14:42:34 +01: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
e28f4efb00 Replace deprecated C++ includes 2023-05-20 15:41:25 +01:00
m-holger
ce66604290 Tune indentations in QPDFWriter::unparseObject
Set indent differently for qdf and non-qdf files.
Combine with preceding newline for qdf files.
2023-03-21 10:59:05 +00:00
m-holger
b7791566f6 Add new data member QPDFWriter::Members::root_og
Also, uninitialize QPDFWriter::Members members.
2023-03-17 11:19:48 +00:00
m-holger
d16308b3f5 Tune QPDFWriter::writeString etc methods
Use string_view parameters and call pipeline write methods directly.
2023-01-23 07:00:58 -05:00
m-holger
e8cdc46286 Tidy QPDFXRefEntry creation 2023-01-21 18:18:15 -05:00
m-holger
aefb8ff9ef Refactor QPDFWriter::writePad 2023-01-08 13:33:10 -05:00
m-holger
8363657cf3 Change QPDFWriter::object_queue to std::vector 2023-01-08 13:33:10 -05:00
m-holger
9c216a06d9 Tune QPDFWriter::enqueueObject 2023-01-08 13:33:10 -05:00
m-holger
59191ebbc4 Tune QPDFWriter::unparseObject 2023-01-07 13:27:17 -05:00
m-holger
383f5a0077 Refactor QPDFWriter::enqueueObject
Move test for m->linearized outside loop.
2022-12-31 09:22:45 -05:00
m-holger
cfcb279e49 Alternative fix logic for fixDanglingReferences 2022-12-06 15:21:34 -05:00
m-holger
2e6869483b Replace calls to QUtil::int_to_string with std::to_string 2022-09-21 15:57:14 -04:00
Jay Berkenbilt
c7a4967d10 Change reset to disconnect and clarify comments
I decided that it's actually fine to copy a direct object to another
QPDF. Even if we eventually prevent a QPDFObject from having multiple
parents, this could happen if an object is moved.
2022-09-08 11:06:15 -04:00
Jay Berkenbilt
264e25f391 Clear owning QPDF information for all objects, not just indirect 2022-09-08 10:19:38 -04:00
m-holger
1553868c4a Add QPDF::getObject to replace getObjectByObjGen and getObjectByID
For consistency with similar methods, e.g. replaceObject.
2022-08-01 19:22:37 +01:00
Jay Berkenbilt
4feb10fdaf
Merge pull request #734 from m-holger/nullptr
Code tidy : replace 0 with nullptr or true
2022-07-31 08:33:45 -04:00
m-holger
073808aa50 Code tidy : replace 0 with nullptr or true 2022-07-26 13:40:13 +01:00
Jay Berkenbilt
b3e6d445cb Tweak "AndGet" mutator functions again
Remove any ambiguity around whether old or new value is being
returned.
2022-07-24 15:42:23 -04:00
m-holger
eeb6162f76 Add optional parameter separator to QPDFObjGen::unparse
Also, revert inlining of unparse and operator << from commit 4c6640c in
order to avoid exposing QUtil.
2022-07-24 15:41:48 +01:00
Jay Berkenbilt
3a7ee7e938 Move C-based ProgressReporter helper into QPDFWriter 2022-06-19 08:46:58 -04:00
m-holger
6c69a747b9 Code clean up: use range-style for loops wherever possible
Remove variables obsoleted by commit 4f24617.
2022-05-21 16:06:29 -04:00
Jay Berkenbilt
6c2fb5b8f0 Add test for bad data and bad datafile 2022-05-20 13:33:30 -04:00
Jay Berkenbilt
21d6e3231f Make use of the new Pipeline methods in some places 2022-05-03 18:31:23 -04:00
Jay Berkenbilt
59f3e09edf Make Pipeline::write take an unsigned char const* (API change) 2022-05-03 18:31:22 -04:00
Jay Berkenbilt
62bf296a9c Make assert handling less error-prone
Prevent my future self or other contributors from using assert in
tests and then having that assert not do anything because of the
NDEBUG macro.
2022-05-03 18:31:22 -04:00
Jay Berkenbilt
92b692466f Remove remaining incorrect assert calls from implementation 2022-05-03 18:31:22 -04:00
Jay Berkenbilt
8ccd3a8a89 Mark weak encryption with API changes (fixes #576) 2022-04-30 17:24:15 -04:00