summaryrefslogtreecommitdiffstats
path: root/examples
AgeCommit message (Collapse)Author
2018-08-13Catch exceptions as const references (fixes #236)Jay Berkenbilt
This fix allows qpdf to compile/test cleanly with gcc 8.
2018-06-22Add missing headersJay Berkenbilt
2018-06-21Add interactive form exampleJay Berkenbilt
2018-06-21Convert examples to use new page helper classesJay Berkenbilt
2018-02-19Properly handle strings with PDF Doc Encoding (fixes #179)Jay Berkenbilt
The QPDF_String::getUTF8Val() method was not treating strings that weren't explicitly Unicode as PDF Doc Encoded. This only affects characters in the range 0x80 through 0xa0.
2018-02-19Simplify TokenFilter interfaceJay Berkenbilt
Expose Pl_QPDFTokenizer, and have it do more of the work of managing the token filter's pipeline.
2018-02-19Add additional interface for filtering page contentsJay Berkenbilt
2018-02-19Filter tokens exampleJay Berkenbilt
2018-02-19Bug fix: content normalizer should not add trailing newlineJay Berkenbilt
Adding a trailing newline in content normalization damages files whose contents are split across streams in the middle of tokens. Let QPDFWriter add the newline with the indicator to ignore the newline, which it already does. This changes the way some qdf files look.
2018-02-19Switch from parseContentStream to parsePageContentsJay Berkenbilt
2018-02-04Rename test output files (fixes #173)Jay Berkenbilt
Some file names had `...` in their name, which causes problems on some systems.
2018-02-04Add comment to setStaticID callJay Berkenbilt
2018-01-14Use correct link directory order (fixes #158)Jay Berkenbilt
Make sure to link from the source tree before linking from the system. In many environments, this is necessary to allow a newly built qpdf to link properly instead of trying to link or resolve libraries from an older installed version.
2017-08-29Replace all atoi calls with QUtil::string_to_intJay Berkenbilt
The latter catches underflow/overflow.
2017-08-22Spell checkJay Berkenbilt
2017-08-21Enhance pdf-create exampleJay Berkenbilt
pdf-create now creates images with different color spaces and encoding schemes and verifies them for data correctness.
2017-08-21Enable finer grained control of stream decodingJay Berkenbilt
This commit adds several API methods that enable control over which types of filters QPDF will attempt to decode. It also adds support for /RunLengthDecode and /DCTDecode filters for both encoding and decoding.
2017-08-05Add --split-pages option (fixes #30)Jay Berkenbilt
2017-07-30Fix command-line checking in pdf-split-pages exampleJay Berkenbilt
2017-07-28Convert many more errors to warningsJay Berkenbilt
2017-07-26Make windows includes lowercase (fixes #123)slurdge
For cross compiling.
2015-11-01Comment use of static ID in examplesJay Berkenbilt
Make sure people know that static ID should be used only for testing.
2014-06-07Example: fast split into single pagesJay Berkenbilt
This is faster than using qpdf --pages to do it.
2013-11-30Allow -DNO_GET_ENVIRONMENT to avoid GetEnvironmentVariableJay Berkenbilt
If NO_GET_ENVIRONMENT is #defined at compile time on Windows, do not call GetEnvironmentVariable. QUtil::get_env will always return false. This option is not available through configure. This was added to support a specific user's requirements to avoid calling GetEnvironmentVariable from the Windows API. Nothing in qpdf outside the test coverage system in qtest relies on QUtil::get_env.
2013-10-18Security: replace operator[] with atJay Berkenbilt
For std::string and std::vector, replace operator[] with at. This was done using an automated process. See README.hardening for details.
2013-06-14Use QPDFObjectHandle::getObjGen() where appropriateJay Berkenbilt
In internal code and examples, replace calls to getObjectID() and getGeneration() with calls to getObjGen() where possible.
2013-03-05Use portable versions of some UNIX-specific callsJay Berkenbilt
Remove needless calls to open, close, and fileno; call remove instead of unlink.
2013-03-04Remove all old-style casts from C++ codeJay Berkenbilt
2013-03-04Replace many calls to sprintf with QUtil::hex_encodeJay Berkenbilt
Add QUtil::hex_encode to encode binary data has a hexadecimal string, and use it in place of sprintf where possible.
2013-01-23Cosmetic changes to be closer to Adobe terminologyJay Berkenbilt
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-22Add getTypeCode() and getTypeName()Jay Berkenbilt
Add virtual methods to QPDFObject, wrappers to QPDFObjectHandle, and implementations to all the QPDF_Object types.
2013-01-20Add QPDFObjectHandle::parseContentStream methodJay Berkenbilt
This method allows parsing of the PDF objects in a content stream or array of content streams.
2012-07-26Restore coverage caseJay Berkenbilt
Previous commit lost coverage case for buffer-based replaceStreamData.
2012-07-21Implement QPDFObjectHandle::parseJay Berkenbilt
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-07Don't require stream data provider to know length in advanceJay Berkenbilt
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-06-27Add a few minor enhancements to recent workJay Berkenbilt
Test coverage case for new newStream method Expose decimal_places argument for double-based newReal All enhancements suggested by Tobias.
2012-06-27Add QPDFObjectHandle::newStream(QPDF *, std::string const&)Tobias Hoffmann
This makes the code simpler than having to create a buffer of a fixed size and copy the string to it.
2012-06-23Add pdf-from-scratch exampleJay Berkenbilt
2012-06-22Switch some code to use empty newArray/newDictionaryJay Berkenbilt
2012-06-20Portability issues: off_t, unlinkJay Berkenbilt
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.
2010-10-04don't overrun argv with invalid argumentsJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@1043 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-09-24update code to new PointerHolder, and reintroduce change that was ↵Jay Berkenbilt
accidentally backed out git-svn-id: svn+q:///qpdf/trunk@1031 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-06invert images exampleJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@1001 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-06rename programJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@1000 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-06commentJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@999 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-06renameJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@998 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-05add double-page-size exampleJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@996 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-04-10change output message from qpdf --check when no errors are foundJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@955 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-23improve C error handling interfaceJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@884 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-23fix libs orderingJay Berkenbilt
git-svn-id: svn+q:///qpdf/trunk@874 71b93d88-0707-0410-a8cf-f5a4172ac649