Jay Berkenbilt
b663926538
Remove QPDFObject::object_type_e as alias for qpdf_object_type_e
2022-09-01 18:11:22 -04:00
Jay Berkenbilt
ceeb25f3c8
Rename --report-mem-usage to --report-memory-usage
...
Avd xcsv brvtns.
2022-09-01 17:15:41 -04:00
Jay Berkenbilt
3d029fb17e
Merge pull request #730 from m-holger/allpages
...
Tidy QPDF::getAllPagesInternal and QPDF::pushInheritedAttributesToPageInternal
2022-09-01 15:28:32 -04:00
m-holger
2b7e9ba2f5
Remove methods and parameters obsoleted by the last two commits
2022-09-01 17:20:02 +01:00
m-holger
1bb40238e0
Add method QPDFObject::getObjGen and remove QPDFObjectHandle::og
2022-09-01 17:19:40 +01:00
m-holger
5033e3b215
Add method QPDFObject::getQPDF and remove QPDFObjectHandle::qpdf
2022-09-01 17:19:31 +01:00
m-holger
4a8515912c
Add method QPDFObject::resolve
2022-09-01 17:19:06 +01:00
m-holger
56e9bcabe9
Add methods QPDFObject::setObjGen and QPDFObject::resetObjGen
...
Also, modify QPDFObject::swapWith to update the ObjGens of the swapped
objects.
Modify QPDF::newIndirect and QPDF::updateCache to keep object ObjGens
up to date.
2022-09-01 17:09:48 +01:00
m-holger
89061d5b33
Change QPDF_Unresolved::create method to take QPDF* and QPDFObjGen parameters
2022-09-01 17:09:07 +01:00
m-holger
ae6e484e23
Change return type of QPDF::resolve to void
2022-09-01 17:08:45 +01:00
m-holger
356b582cec
Remove QPDFObjectHandle::newIndirect
...
Modify QPDFParser::parse to call QPDF::getObject instead.
2022-09-01 16:59:01 +01:00
m-holger
556c34f0f2
Add private method QPDF::ObjCache::update
...
Add a new obj_cache entry or update an existing entry in place.
2022-09-01 14:30:26 +01:00
m-holger
c0cd72a3ee
Add private methods QPDF::isCached and QPDF::isUnresolved
2022-09-01 14:29:53 +01:00
m-holger
23d50a2f14
Remove QPDFObjectHandle::initialized
2022-09-01 14:29:38 +01:00
m-holger
c7005e8a6d
Remove virtual methods QPDFValue::getTypeCode and getTypeName
2022-09-01 14:29:02 +01:00
m-holger
27fae2b55e
Remove QPDF::ObjectChanged
...
Also change QPDF::replaceObject and QPDF::swapObjects such that the
QPDFObject assigned to an og in the obj_cache is never replaced; only
QPDFObject::value is updated.
2022-09-01 14:27:46 +01:00
m-holger
431bd666c0
Split QPDFObject into QPDFObject and QPDFValue
2022-09-01 14:19:34 +01:00
m-holger
114bffa089
Add private methods QPDFObjectHandle::asArray etc
...
Centralise casting of QPDFObjects and reduce repeated dereferencing.
2022-09-01 00:10:04 +01:00
m-holger
2a2eebcaea
Modify newIndirect to set QPDFObjectHandle::obj
2022-08-31 22:47:11 +01:00
m-holger
16841bec32
Remove QPDFObjectHandle::makeReserved
2022-08-31 22:46:55 +01:00
m-holger
07b66eb0b6
Remove QPDFObjectHandle::reserved
2022-08-31 22:46:25 +01:00
m-holger
7248cab71b
Add class QPDF_Unresolved
...
Allow QPDFObjectHandle::obj to be set prior resolving object.
ot_unresolved has been appended to the list object types in order to
preserve the output of existing test cases.
2022-08-31 22:46:09 +01:00
Jay Berkenbilt
a078202c1b
Merge pull request #752 from jberkenbilt/report-mem-usage
...
Report mem usage
2022-08-31 15:50:17 -04:00
Jay Berkenbilt
433f1dae19
Add --report-mem-usage option for debugging/testing
2022-08-31 14:47:27 -04:00
Jay Berkenbilt
0a54247652
Add QUtil::get_max_memory_usage for testing
2022-08-31 14:47:27 -04:00
m-holger
9532dca3a5
Inline QPDFObjectHandle::setParsedOffset
...
Part of #729
2022-08-30 14:55:45 +01:00
m-holger
6fc982b71a
Move QPDFObjectHandle::setObjectDescriptionFromInput to QPDFParser
...
Part of #729
2022-08-30 06:42:46 +01:00
m-holger
6670c685ab
Move QPDFObjectHandle::parseInternal to new class QPDFParser
...
Part of #729
2022-08-30 05:56:23 +01:00
Jay Berkenbilt
0adfd74f8b
Merge pull request #747 from m-holger/new_stream
...
Add optional parameter allow_nullptr to QPDFObjectHandle::getOwningQPDF
2022-08-29 16:33:19 -04:00
m-holger
c53d54b13d
Add optional parameter allow_nullptr to QPDFObjectHandle::getOwningQPDF
...
Also, inline method and add optional parameter error_msg.
2022-08-28 22:15:59 +01:00
m-holger
fc4feb6f1a
Remove BufferInputSource::Members
2022-08-27 12:19:51 +01:00
m-holger
d6a447b654
Remove ClosedFileInputSource::Members
2022-08-27 12:13:39 +01:00
m-holger
69a5fb7047
Add methods InputSource::fastRead, fastUnRead and fastTell
...
Provide buffered input for QPDFTokenizer.
2022-08-26 23:55:56 +01:00
m-holger
dc5c8b82eb
Remove FileInputSource::Members
2022-08-25 12:42:14 +01:00
m-holger
b45420a980
Remove QPDFTokenizer::unread_char
2022-08-25 11:30:49 +01:00
m-holger
706106dabb
Refactor QPDFTokenizer::betweenTokens()
2022-08-25 11:30:35 +01:00
m-holger
42ed58e446
Integrate booleans and null into state machine in QPDFTokenizer
2022-08-25 11:30:13 +01:00
m-holger
fe33b7ca18
Integrate numbers into state machine in QPDFTokenizer
2022-08-25 11:26:46 +01:00
m-holger
931fbb6156
Integrate names into state machine in QPDFTokenizer
2022-08-25 11:26:38 +01:00
m-holger
a3f3238f37
Split QPDFTokenizer::handleCharacter into individual methods
2022-08-25 11:26:05 +01:00
m-holger
6111a6a424
Refactor QPDFTokenizer::inCharCode
2022-08-25 10:55:45 +01:00
m-holger
e4fe0d5cf5
Refactor QPDFTokenizer::inHexstring
2022-08-25 10:50:06 +01:00
m-holger
7c32f6cc2e
Add state st_string_escape in QPDFTokenizer
2022-08-25 10:41:36 +01:00
m-holger
7c5778f999
Add state st_string_after_cr in QPDFTokenizer
2022-08-21 11:13:48 +01:00
m-holger
f29d0a6312
Add state st_char_code in QPDFTokenizer
2022-08-21 11:01:48 +01:00
m-holger
d26b537a7c
Add private method QPDFTokenizer::inString
2022-08-21 02:54:34 +01:00
m-holger
2697ba49bc
Add private method QPDFTokenizer::inHexstring
2022-08-21 02:46:31 +01:00
m-holger
86ade3f9cd
Add private method QPDFTokenizer::handleCharacter
2022-08-21 02:26:27 +01:00
m-holger
45a6100cbb
Inline QUtil functions used by QPDFTokenizer
2022-08-18 15:23:35 +01:00
m-holger
c08bb0ec02
Remove QPDFTokenizer::Members
2022-08-18 13:13:19 +01:00
Jay Berkenbilt
cef6425bca
Disable QTC inside the library by default ( fixes #714 )
...
This results in measurable performance improvements to packaged binary
libqpdf distributions. QTC remains available for library users and is
still selectively enabled in CI.
2022-08-07 16:20:49 -04:00
Jay Berkenbilt
32e30a3af2
Resolve QPDF{Name,Number} tree helper linker issues ( fixes #745 )
...
This is a guess...I'm not sure exactly why there are linker issues or
how to reproduce them.
2022-08-07 09:21:01 -04:00
Jay Berkenbilt
7084c3f715
Add comment clarifying getObject vs others
2022-08-06 14:25:12 -04:00
Jay Berkenbilt
a3037ca440
Merge pull request #739 from m-holger/getobject
...
Add QPDF::getObject to replace getObjectByObjGen and getObjectByID
2022-08-06 14:23:56 -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
m-holger
407b0766b8
Inline QPDFObjectHandle::getObjGen etc
...
Also, make QPDFObjectHandle::isIndirect const.
2022-08-01 15:08:48 +01:00
m-holger
0356bcecc5
Tidy QPDF::pushInheritedAttributesToPageInternal
...
Remove unnecessary parameters.
Remove code that is unnecessary as result of a prior call to QPDF::getAllPages.
Avoid clearing and rebuilding of m->all_pages.
2022-08-01 13:29:14 +01:00
m-holger
4ccca20db0
Remove redundant parameter from QPDF::getAllPagesInternal
2022-08-01 13:29:14 +01:00
Jay Berkenbilt
a9c0b02668
Fix code formatting for deprecated
2022-07-31 17:10:55 -04:00
Jay Berkenbilt
12d065c751
Provide a simpler QPDF::writeJSON
2022-07-31 16:23:17 -04:00
Jay Berkenbilt
5f4224f31a
Simplify --json-output
...
Now --json-output just changes defaults. Allow output file with --json.
2022-07-31 16:23:17 -04:00
Jay Berkenbilt
80acfc3826
Fix --json-help to take a version parameter
2022-07-31 16:23:17 -04:00
Jay Berkenbilt
69820847af
Change the output of --json to use "qpdf" instead of "objects"
2022-07-31 15:17:01 -04:00
Jay Berkenbilt
d01c4f8819
Change --json-output format
...
from "qpdf-v2" to "qpdf": [..., ...]
2022-07-31 10:32:55 -04:00
Jay Berkenbilt
bb96499b61
Update docs and prepare QPDF::writeJSON for changes
...
Add additional parameters that will be needed to call QPDF::writeJSON
in partial mode.
2022-07-31 10:32:55 -04:00
Jay Berkenbilt
0e3d4cdc97
Fix/clarify meaning of depth parameter to json write methods
2022-07-31 10:32:55 -04:00
Jay Berkenbilt
8ad39a6c9a
Spell check
2022-07-31 10:32:55 -04:00
Jay Berkenbilt
4674c04cb8
JSON schema: support multi-element array validation
2022-07-24 16:44:51 -04:00
Jay Berkenbilt
f8d1ab9462
JSON schema -- accept single item in place of array
...
When the schema wants a variable-length array, allow a single item as
well as allowing an array.
2022-07-24 16:17:03 -04: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
8b4afa428e
Revert making second parameter of QPDFObjGen::QPDFObjGen optional
...
Also, change test for QPDFObjGen::isIndirect to obj != 0.
Delete comment from commit afd35f9
.
2022-07-24 16:55:10 +01:00
m-holger
afd35f9a30
Overload StreamDataProvider::provideStreamData
...
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
2022-07-24 16:02:35 +01:00
m-holger
f7978db1f6
QPDFObjGen : tidy QPDF private methods
...
Change method signatures to use QPDFObjGen.
Use QPDFObjGen methods where possible.
Remove redundant QPDF::objGenToIndirect.
2022-07-24 16:02:35 +01:00
m-holger
3404ca8ac8
QPDFObjGen : tidy QPDFObjectHandle private methods
...
Change method signature to use QPDFObjGen.
2022-07-24 15:59:49 +01:00
m-holger
b123f79dfd
Replace QPDFObjectHandle::objid and generation with QPDFObjectHandle::og
2022-07-24 15:59:49 +01:00
m-holger
c0168cf88c
QPPFObjGen : tidy QPDF::readObjectAtOffset
...
Change method signature to use QPDFObjGen.
2022-07-24 15:59:49 +01:00
m-holger
6ea17d1f0e
Make second parameter of QPDFObjGen::QPDFObjGen optional
2022-07-24 15:41:48 +01:00
m-holger
21b8625f95
Add QPDFObjGen operator !=
2022-07-24 15:41:48 +01:00
m-holger
bc5f0fa20b
Add method QPDFObjGen::isIndirect
2022-07-24 15:41:48 +01: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
9de29daba5
Format code after previous pull request
2022-07-16 15:29:18 -04:00
m-holger
4c6640cb45
Inline QPDFObjGen methods
...
ABI breaking change
2022-07-16 14:32:48 -04:00
Jay Berkenbilt
a603c1e395
Run format-code
2022-06-27 12:50:35 -04:00
m-holger
f0a8178091
Refactor QPDFObject creation and cloning
...
Move responsibility for creating shared pointers to objects and cloning from QPDFObjectHandle to QPDFObject.
2022-06-27 12:47:02 -04:00
m-holger
5aa8225f49
Refactor QPDFObjectTypeAccessor and QPDFObjectHandle::dereference
2022-06-27 10:39:04 -04:00
Jay Berkenbilt
0c7c7e4ba4
Track whether certain page modifying methods have been called
...
We need to know whether pushInheritedAttributesToPage or getAllPages
have been called when generating JSON output. When reading the JSON
back in, we have to call the same methods so that object numbers will
line up properly.
2022-06-25 13:55:45 -04:00
m-holger
e9c1637353
Add private method QPDFObjectHandle::getObjGenAsStr
...
Also, use methods to access objid and generation.
2022-06-25 08:25:32 -04:00
Jay Berkenbilt
eae75dbe44
Add Pl_Function -- a generic function pipeline
2022-06-19 09:12:29 -04:00
Jay Berkenbilt
bb0ea2f8e7
Add qpdfjob_register_progress_reporter
2022-06-19 08:46:58 -04:00
Jay Berkenbilt
87412eb05b
Add QPDFJob::registerProgressReporter
2022-06-19 08:46:58 -04:00
Jay Berkenbilt
3a7ee7e938
Move C-based ProgressReporter helper into QPDFWriter
2022-06-19 08:46:58 -04:00
Jay Berkenbilt
8e361d98f0
Add examples for output capture ( fixes #691 )
2022-06-19 08:46:58 -04:00
Jay Berkenbilt
8130d50e3b
Add C API to QPDFLogger
2022-06-19 08:46:58 -04:00
Jay Berkenbilt
daef4e8fb8
Add more flexible funtions to qpdfjob C API
2022-06-19 08:46:58 -04:00
Jay Berkenbilt
28cc3692e3
Expose exit code values to C API via Constants.h
2022-06-18 11:36:11 -04:00
Jay Berkenbilt
e0720eaa78
Use the default logger for other writes to stdout/stderr
...
When there is no context for writing output or error messages, use the
default logger.
2022-06-18 10:38:50 -04:00
Jay Berkenbilt
641e92c6a7
QPDF, QPDFJob: use QPDFLogger instead of custom output streams
2022-06-18 09:02:55 -04:00
Jay Berkenbilt
f1f711963b
Add and test QPDFLogger class
2022-06-18 09:02:55 -04:00
Jay Berkenbilt
f588d74140
Add integer types to Pipeline::operator<<
2022-06-18 09:02:55 -04:00
m-holger
5c6808b484
Fix minor doc typos in JSON.hh
2022-06-09 06:40:18 -04:00