2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-05 04:47:53 +00:00
Commit Graph

85 Commits

Author SHA1 Message Date
Jay Berkenbilt
30027481f7 Remove all old-style casts from C++ code 2013-03-04 16:45:16 -05:00
Jay Berkenbilt
32b62035ce Replace many calls to sprintf with QUtil::hex_encode
Add QUtil::hex_encode to encode binary data has a hexadecimal string,
and use it in place of sprintf where possible.
2013-03-04 16:45:15 -05:00
Jay Berkenbilt
bfda717749 Cosmetic changes to be closer to Adobe terminology
Change object type Keyword to Operator, and place the order of the
object types in object_type_e in the same order as they are mentioned
in the PDF specification.

Note that this change only breaks backward compatibility with code
that has not yet been released.
2013-01-23 09:38:05 -05:00
Jay Berkenbilt
913eb5ac35 Add getTypeCode() and getTypeName()
Add virtual methods to QPDFObject, wrappers to QPDFObjectHandle, and
implementations to all the QPDF_Object types.
2013-01-22 10:01:45 -05:00
Jay Berkenbilt
f81152311e Add QPDFObjectHandle::parseContentStream method
This method allows parsing of the PDF objects in a content stream or
array of content streams.
2013-01-20 15:35:39 -05:00
Jay Berkenbilt
f689324214 Restore coverage case
Previous commit lost coverage case for buffer-based replaceStreamData.
2012-07-25 22:32:14 -04:00
Jay Berkenbilt
6bbea4baa0 Implement QPDFObjectHandle::parse
Move object parsing code from QPDF to QPDFObjectHandle and
parameterize the parts of it that are specific to a QPDF object.
Provide a version that can't handle indirect objects and that can be
called on an arbitrary string.

A side effect of this change is that the offset used when reporting
invalid stream length has changed, but since the new value seems like
a better value than the old one, the test suite has been updated
rather than making the code backward compatible.  This only effects
the offset reported for invalid streams that lack /Length or have an
invalid /Length key.

Updated some test code and exmaples to use QPDFObjectHandle::parse.

Supporting changes include adding a BufferInputSource constructor that
takes a string.
2012-07-21 09:06:10 -04:00
Jay Berkenbilt
e2dedde4bd Don't require stream data provider to know length in advance
Breaking API change: length parameter has disappeared from the
StreamDataProvider version of QPDFObjectHandle::replaceStreamData
since it is no longer necessary to compute it in advance.  This
breaking change is justified by the fact that removing the length
parameter provides the caller an opportunity to simplify the calling
code.
2012-07-07 17:33:45 -04:00
Jay Berkenbilt
5f59c32f87 Add a few minor enhancements to recent work
Test coverage case for new newStream method
Expose decimal_places argument for double-based newReal

All enhancements suggested by Tobias.
2012-06-27 10:43:27 -04:00
Tobias Hoffmann
43c404b45a Add QPDFObjectHandle::newStream(QPDF *, std::string const&)
This makes the code simpler than having to create a buffer of a fixed
size and copy the string to it.
2012-06-27 10:19:57 -04:00
Jay Berkenbilt
ffb96ee17e Add pdf-from-scratch example 2012-06-23 09:05:06 -04:00
Jay Berkenbilt
6c0af0844c Switch some code to use empty newArray/newDictionary 2012-06-22 10:09:42 -04:00
Jay Berkenbilt
b856379370 Portability issues: off_t, unlink
New header qpdf/Types.h attempts to make sure size_t and off_t are
defined on any platform and in a way that would work with large file
support.  Additionally, missing header files are included to get
unlink.
2012-06-20 15:18:14 -04:00
Jay Berkenbilt
bcb10021d7 don't overrun argv with invalid arguments
git-svn-id: svn+q:///qpdf/trunk@1043 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-10-04 15:16:32 +00:00
Jay Berkenbilt
a7e269537d update code to new PointerHolder, and reintroduce change that was accidentally backed out
git-svn-id: svn+q:///qpdf/trunk@1031 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-09-24 20:45:18 +00:00
Jay Berkenbilt
cb1d89e763 invert images example
git-svn-id: svn+q:///qpdf/trunk@1001 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-06 01:27:47 +00:00
Jay Berkenbilt
b6c7a80950 rename program
git-svn-id: svn+q:///qpdf/trunk@1000 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-06 00:45:51 +00:00
Jay Berkenbilt
a9bfb10c3e comment
git-svn-id: svn+q:///qpdf/trunk@999 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-06 00:38:30 +00:00
Jay Berkenbilt
6d0e60bf3f rename
git-svn-id: svn+q:///qpdf/trunk@998 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-06 00:37:39 +00:00
Jay Berkenbilt
9ba5b27ce4 add double-page-size example
git-svn-id: svn+q:///qpdf/trunk@996 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-05 21:51:19 +00:00
Jay Berkenbilt
71f171356a change output message from qpdf --check when no errors are found
git-svn-id: svn+q:///qpdf/trunk@955 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-04-10 13:43:16 +00:00
Jay Berkenbilt
7f5d78c2d1 improve C error handling interface
git-svn-id: svn+q:///qpdf/trunk@884 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-23 15:27:30 +00:00
Jay Berkenbilt
3d997eb521 fix libs ordering
git-svn-id: svn+q:///qpdf/trunk@874 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-23 03:33:51 +00:00
Jay Berkenbilt
398354b6f0 update C API for error retrieval
git-svn-id: svn+q:///qpdf/trunk@830 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-20 00:24:44 +00:00
Jay Berkenbilt
3f8c4c2736 categorize all error messages and include object information if available
git-svn-id: svn+q:///qpdf/trunk@829 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-19 23:09:19 +00:00
Jay Berkenbilt
b67a3c15e7 DLL.hh -> DLL.h, move public enumerated types into Constants.h and use them both for C and C++ interfaces
git-svn-id: svn+q:///qpdf/trunk@828 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-19 20:17:14 +00:00
Jay Berkenbilt
351284b5ec make -key not take an argument with a / to appease msys's path translation
git-svn-id: svn+q:///qpdf/trunk@803 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-14 01:06:18 +00:00
Jay Berkenbilt
2b5ac676ed generalize build
git-svn-id: svn+q:///qpdf/trunk@776 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-11 00:24:22 +00:00
Jay Berkenbilt
caa397ed15 generalize build rules, add experimental support for manual compilation without libtool
git-svn-id: svn+q:///qpdf/trunk@753 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-10 14:15:09 +00:00
Jay Berkenbilt
d6d36b6ced C linearization example
git-svn-id: svn+q:///qpdf/trunk@739 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-09-27 20:59:16 +00:00
Jay Berkenbilt
fe18385ffa clean up windows portability code, make remaining test suite pass
git-svn-id: svn+q:///qpdf/trunk@686 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-07-15 04:26:32 +00:00
Jay Berkenbilt
863e5a0869 remove extraneous unistd.h
git-svn-id: svn+q:///qpdf/trunk@681 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-07-13 00:09:22 +00:00
Jay Berkenbilt
630883095f update test suite to handle original object ID comments
git-svn-id: svn+q:///qpdf/trunk@665 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-03-09 16:57:37 +00:00
Jay Berkenbilt
76bf91765e missing header files for gcc 4.3
git-svn-id: svn+q:///qpdf/trunk@607 71b93d88-0707-0410-a8cf-f5a4172ac649
2008-05-04 16:02:53 +00:00
Jay Berkenbilt
9a0b88bf77 update release date to actual date
git-svn-id: svn+q:///qpdf/trunk@599 71b93d88-0707-0410-a8cf-f5a4172ac649
2008-04-29 12:55:25 +00:00