Jay Berkenbilt
8705e2e8fc
Add QPDFWriter method to output to FILE*
2012-07-05 21:24:04 -04:00
Tobias Hoffmann
abb53ac369
Limited inheritance to the attributes explicitly listed in the PDF spec
...
Previous versions of qpdf incorrectly passed arbitrary objects from
/Pages objects down to individual pages in direct contradition with
the PDF specification. These are now left in /Pages. When
intermediate /Pages nodes are being discarded as when the /Pages tree
is being flattened, a warning is issued when unknown keys are
encountered.
2012-07-04 23:04:55 -04:00
Tobias Hoffmann
7770a1b036
Added public method QPDF::pushInheritedAttributesToPage
...
Refactored optimizePagesTree to pushInheritedAttributesToPage and made
public
2012-07-04 16:24:03 -04:00
Tobias Hoffmann
235188df85
Fixed wording error in comment
2012-07-04 14:51:53 -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
f07e3370f0
Add Pl_Concatenate filter
2012-06-27 10:20:38 -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
Tobias Hoffmann
75054c0b94
Add QPDFObjectHandle::newReal(double)
2012-06-27 10:19:01 -04:00
Jay Berkenbilt
2266c6232b
Rework InputSource::readLine to make it much more efficient
...
This rework makes xref reconstruction run much faster and use much
less memory.
2012-06-27 06:48:06 -04:00
Jay Berkenbilt
736bafbb9c
Rename seek functions in QUtil
2012-06-26 23:10:10 -04:00
Jay Berkenbilt
8318d81ada
Fix and test support for files >= 4 GB
2012-06-24 15:56:50 -04:00
Jay Berkenbilt
781c313058
Change QPDF_Integer from int to long long
...
This makes it possible to store offsets that are larger than 2 GB in
the trailer dictionary.
2012-06-24 15:20:01 -04:00
Jay Berkenbilt
4f305488d8
Improve the FILE* version of QPDF::processFile
2012-06-23 18:23:06 -04:00
Jay Berkenbilt
ffb96ee17e
Add pdf-from-scratch example
2012-06-23 09:05:06 -04:00
Jay Berkenbilt
b6bdc0f595
Add factory methods for creating empty arrays and dictionaries.
...
Also updated pdf_from_scratch test driver to use the new factories,
and made some cosmetic improvements and documentation updates for the
emptyPDF() method.
2012-06-22 09:46:33 -04:00
Jay Berkenbilt
a0768e4190
Add QPDF::emptyPDF() and pdf_from_scratch test code
2012-06-21 23:09:05 -04:00
Jay Berkenbilt
81e8752362
Use qpdf_offset_t in place of off_t in public APIs.
...
off_t is used internally only when needed to talk to standard
libraries. This requires that the "long long" type be supported by
the compiler.
2012-06-21 21:23:24 -04:00
Jay Berkenbilt
d1ebe30ff6
Add QPDFObjectHandle::shallowCopy()
2012-06-21 16:15:09 -04:00
Jay Berkenbilt
eb802cfa8c
Implement page manipulation APIs
2012-06-21 15:01:02 -04:00
Jay Berkenbilt
df493c352f
Refactor optimizePagesTree
...
Split optimizePagesTree into a simpler top-level routine and a
recursive internal routine.
2012-06-21 15:01:02 -04:00
Tobias Hoffmann
5d3f93be29
Added first version of pages API.
2012-06-21 15:01:02 -04:00
Tobias Hoffmann
405a549f8c
Make QPDFObjectHandle::assertPageObject() public.
...
The method is helpful in other places, like the upcoming QPDF::addPage, too.
2012-06-21 15:01:02 -04:00
Tobias Hoffmann
47a846a7e0
Added method to clear pages cache.
2012-06-21 15:01:02 -04:00
Jay Berkenbilt
f59ff6fcc2
fix include order for off_t
2012-06-21 14:11:22 -04:00
Jay Berkenbilt
bc1c4bb578
Add QPDF::processFile that takes an open FILE*
2012-06-21 08:00:35 -04:00
Tobias Hoffmann
db7474e0fa
Added additional array mutators
...
Added methods to append to arrays, insert items into arrays, and
replace array contents with a vector of items.
2012-06-20 15:29:44 -04:00
Jay Berkenbilt
5d4cad9c02
ABI change: fix use of off_t, size_t, and integer types
...
Significantly improve the code's use of off_t for file offsets, size_t
for memory sizes, and integer types in cases where there has to be
compatibility with external interfaces. Rework sections of the code
that would have prevented qpdf from working on files larger than 2 (or
maybe 4) GB in size.
2012-06-20 15:20:26 -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
2757b9b05f
export new methods
2011-08-11 15:55:06 -04:00
Jay Berkenbilt
76b1659177
enhance PointerHolder so that it can explicitly be told to use delete [] instead of delete, thus making it useful to run valgrind over qpdf during its test suite
2011-08-11 11:57:37 -04:00
Jay Berkenbilt
14fe2e6de3
qpdf_set_info_key, qpdf_get_info_key
2011-08-11 10:48:37 -04:00
Jay Berkenbilt
759c56e1fe
implement ability to save PDF to memory, also update ChangeLog
2011-08-10 16:34:29 -04:00
Jay Berkenbilt
655c55f848
implement methods to get dictionary and array contents as map and vector
2011-08-10 13:33:58 -04:00
Jay Berkenbilt
7dc197ef88
implement replace and swap
2011-08-10 12:42:48 -04:00
Jay Berkenbilt
c551b972f6
update version to 2.2.3, update copyright to 2011
...
git-svn-id: svn+q:///qpdf/trunk@1051 71b93d88-0707-0410-a8cf-f5a4172ac649
2011-04-30 19:19:30 +00:00
Jay Berkenbilt
b36f62a326
add qpdf_read_memory to C API
...
git-svn-id: svn+q:///qpdf/trunk@1044 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-10-04 15:24:10 +00:00
Jay Berkenbilt
a72ce95c92
setOutputStreams
...
git-svn-id: svn+q:///qpdf/trunk@1035 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-10-01 11:02:35 +00:00
Jay Berkenbilt
9f444ffef3
add QPDF::processMemoryFile and API additions to support it
...
git-svn-id: svn+q:///qpdf/trunk@1034 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-10-01 10:20:38 +00:00
Jay Berkenbilt
ce8b1ba6a5
convert file to a PointerHolder<InputSource> so it could be either a file or a buffer; also fix a bug in BufferInputSource::seek
...
git-svn-id: svn+q:///qpdf/trunk@1030 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-09-24 19:10:08 +00:00
Jay Berkenbilt
aa035961b3
add * and -> operators
...
git-svn-id: svn+q:///qpdf/trunk@1029 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-09-24 19:09:22 +00:00
Jay Berkenbilt
bd7261da9b
getRawStreamData()
...
git-svn-id: svn+q:///qpdf/trunk@1010 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-09 23:33:40 +00:00
Jay Berkenbilt
2dbc1006fb
addPageContents
...
git-svn-id: svn+q:///qpdf/trunk@995 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-05 21:06:49 +00:00
Jay Berkenbilt
6f2bd7eb3a
newStream
...
git-svn-id: svn+q:///qpdf/trunk@991 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-05 20:20:52 +00:00
Jay Berkenbilt
11df7809af
add pipeline-based stream data replacement function
...
git-svn-id: svn+q:///qpdf/trunk@990 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-05 19:04:22 +00:00
Jay Berkenbilt
998a6cbee9
remove stream_data_handler; it wouldn't work as designed. replacement data implemented but not tested
...
git-svn-id: svn+q:///qpdf/trunk@988 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-02 22:40:52 +00:00
Jay Berkenbilt
9a06fc541c
ready to implement replacement stream data
...
git-svn-id: svn+q:///qpdf/trunk@987 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-02 22:17:01 +00:00
Jay Berkenbilt
00ed5af502
remove use of float for version comparison
...
git-svn-id: svn+q:///qpdf/trunk@984 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-08-02 16:18:46 +00:00
Jay Berkenbilt
9496b2cb20
fix memory leak
...
git-svn-id: svn+q:///qpdf/trunk@976 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-06-06 13:32:08 +00:00
Jay Berkenbilt
84353451a3
refactor to isolate pad calculation
...
git-svn-id: svn+q:///qpdf/trunk@956 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-04-18 23:01:31 +00:00
Jay Berkenbilt
bcd621e208
update copyrights for 2010
...
git-svn-id: svn+q:///qpdf/trunk@935 71b93d88-0707-0410-a8cf-f5a4172ac649
2010-01-25 01:23:20 +00:00