Commit Graph

365 Commits

Author SHA1 Message Date
m-holger 60c7d594b8 In QPDF::filterCompressedObjects ignore objects not in QPDFWriter tables
Add fuzz case 68377.
2024-04-30 10:46:06 +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 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 c1a48ec81d Documentation fixes for set/remove page labels 2024-02-17 16:13:46 -05:00
m-holger b15d0bf6e1 Add new method QPDF_Stream::writeStreamJSON
(Replacing the temporary implementation from the last commit.)
2024-02-16 11:37:50 +00:00
m-holger 920e929864 Reimplement QPDF_Stream::getStreamJSON in terms of writeStreamJSON
writeStreamJSON is a temporary implementation minimally adapted from
getStreamJSON.
2024-02-16 11:07:20 +00:00
m-holger 9589fad1e5 Reimplement QPDFObjectHandle::getJSON in terms of writeJSON 2024-02-16 11:00:20 +00:00
m-holger 431987475b Add new method QPDF_Name::analyzeJSONEncoding
Provide a custom method to check whether a name is valid utf8. Integrate
checking for characters that need to be escaped in JSON.
2024-02-16 10:52:44 +00:00
m-holger e2737ab646 Add new writeJSON methods
Create an alternative to getJSON to allow an object handle to be written as JSON without the overhead of creating a JSON object.
2024-02-16 10:51:25 +00:00
m-holger 9e90007a4a Add new private class JSON::Writer
Create a simple utility class for writing JSON to a pipeline.
2024-02-16 10:32:41 +00:00
Jay Berkenbilt 7caa9ddf5a Format code 2024-02-04 16:12:01 -05:00
m-holger d946ad6c30 In Pl_TIFFPredictor::processRow buffer output 2024-01-27 17:16:53 +00:00
m-holger c01fc3c2ae In Pl_TIFFPredictor::processRow avoid repeated vector allocation
Also, modernize for loop.
2024-01-26 20:51:29 +00:00
m-holger 2e8b5f290c In Pl_TIFFPredictor avoid repeated calls to getNext 2024-01-26 20:46:38 +00:00
m-holger 5b7a44e1cc In Pl_TIFFPredictor remove calls to memcpy
Instead of overwriting cur_row.data() use clear and insert.
2024-01-26 20:25:15 +00:00
m-holger 902fd6df71 Change Pl_TIFFPredictor::cur_row to std::vector<unsigned char> 2024-01-26 20:20:16 +00:00
Jay Berkenbilt 5b2e543089 Honor repeated overlay/underlay 2024-01-11 06:13:57 -05:00
Jay Berkenbilt 6cf04b0a88 Allow repetition of overlay/underlay
This is just QPDFJob wiring.
2024-01-11 06:13:57 -05:00
Jay Berkenbilt 7de0b3f3c0 JSONHandler: add fallback handler support 2024-01-11 06:13:57 -05:00
Jay Berkenbilt 9c723aeb56 Allow --file with --overlay and --underlay 2024-01-10 16:44:46 -05:00
Jay Berkenbilt 34f013c1be Allow --file and --range with --pages
Accept --file and --range as named parameters in additional to
allowing positional arguments. This is in preparation for adding
additional flags.
2024-01-10 16:44:17 -05:00
m-holger 5e9de5cd50 Tune handling of sparse arrays in QPDF_Array
Sparse arrays are rare. Dynamically create the variables needed to manage
them only when needed.
2024-01-10 09:36:18 +00:00
Jay Berkenbilt 08e3050d5f Automated changes for --set-page-labels
This commit contains the changes from generate_auto_job based on
manual changes from the previous commit.
2024-01-05 17:10:45 -05:00
Jay Berkenbilt d8d70ecca2 Support comma-separated numeric values with --collate (fixes #505) 2024-01-01 18:57:32 -05:00
Jay Berkenbilt 070ee710eb Support excluding values from numeric ranges (fixes #564, #790) 2024-01-01 10:48:14 -05:00
Jay Berkenbilt 4ca185fd96 Remove --disable-signatures; incorporate into --remove-restrictions
Rather than adding yet another flag that is almost never useful on its
own, just have --remove-restrictions disable digital signatures. The
operations are still separate in the API.
2023-12-24 07:36:07 -05:00
Jay Berkenbilt 6b8aa1db6f Spell check 2023-12-23 10:00:03 -05:00
Jay Berkenbilt 909a0b3f3a Implement --disable-signatures (fixes #1015) 2023-12-23 08:50:42 -05:00
Jay Berkenbilt c0c7cef16c Generate a UNIX man page (fixes #874) 2023-12-22 21:22:34 -05:00
Jay Berkenbilt 7d7e2234a5 Implement new --encrypt args and completion (fixes #784)
Positional arguments are supported in a backward-compatible way, but
completion no longer guides users to it.
2023-12-22 20:10:18 -05:00
Jay Berkenbilt 1173a0bdfc Add --user-password, --owner-password, --bits to --encrypt
Add the command-line arguments. They don't do anything yet.
2023-12-22 18:13:05 -05:00
Jay Berkenbilt bb12a7ff8d Tweak comment in QPDFParser refactor 2023-12-21 15:45:34 -05:00
m-holger 1285f9767a Add new method QPDFParser::fixMissingKeys 2023-11-03 11:22:21 +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 1548b8d8be In QPDFParser::parseRemainder eliminate most temporary variables 2023-11-03 01:34:10 +00:00
m-holger 4c8836d520 In QPDFParser::parse eliminate most temporary variables 2023-11-03 01:33:59 +00:00
m-holger c912af7384 In QPDFParser remove state st_top 2023-11-03 01:32:04 +00:00
m-holger 5a1bf035f9 Add new method QPDFParser::parseRemainder
The new method is temporarily an (almost) complete copy of parse, which is
temporarily (almost) unchanged.
2023-11-03 01:26:12 +00:00
m-holger db6ab9cbfa In QPDFParser::parse merge state and object stacks 2023-11-01 15:45:17 +00:00
m-holger d904eab84c In QPDFParser::parse refactor handling of array_open and dict_open tokens 2023-11-01 15:38:01 +00:00
m-holger 90829228b8 In QPDFParser::parse refactor handling of dict_close tokens 2023-11-01 15:27:52 +00:00
m-holger 26e0bf4610 In QPDFParser::parse refactor eof handling 2023-11-01 15:23:30 +00:00
m-holger 37f7a73488 In QPDFParser::parse refactor handling of bad tokens 2023-11-01 15:21:08 +00:00
Jay Berkenbilt 87765bace9 Move random number device check to runtime (fixes #1022)
Having it at compile time breaks cross-compilation and isn't really
right anyway.
2023-09-03 09:36:13 -04:00