Age | Commit message (Collapse) | Author |
|
Passing a pdf_document to pdf_graft_object to specify the source
document is redundant, as if we need to know the document, it will
be pickled into the object we are copying.
Similarly, repeatedly having to pass the destination document
seems silly when we can just pickle it into the map too (and this
removes the possibility of people using a different destination
document part way through).
This leaves to simplifying the pdf_graft_object call, at the expense
of splitting it into 2 calls - one with a map, and one without.
Also, we can delay the creation of the mapping table until we are
first asked to copy an object that requires deep copying. This
avoids us ever having to manually pass in the source document.
This has knock-on effects in the java and javascript classes, but
with the advantage of being clearer in the end (IMHO).
Conflicts:
include/mupdf/pdf/document.h
|
|
|
|
|
|
We want to turn pdf_page into a thin wrapper around a pdf_obj, so that
any updates to the underlying PDF objects will be reflected without
having to reload the pdf_page.
|
|
Affects pdfclean, pdfmerge, and pdfposter.
|
|
Remove unnecessary extra indirect object; pdf_add_object returns
an indirect reference already, so we don't need to duplicate it.
|
|
|
|
Use comma-separated list of flags and key/value pairs, for
example: "linearize,resolution=72,colorspace=gray"
|
|
The handling of not-decompressing images/fonts was geared towards
pdfclean usage; but now that we can create new PDF files, it makes
more sense to ask for images and fonts to be compressed, rather than
asking for them not to be decompressed with quirky interaction with
the 'expand' and 'deflate' flags.
If -f or -i are set, we will never decompress images, and we will
compress them if they are uncompressed.
If -d is set, we will first decompress all streams (module -f or -i).
If -z is set, we will then compress all uncompressed streams.
|
|
|
|
This commit adds a page merging tool. The tool demonstrates the
use of object grafting. The object grafting function recursively
goes through the object to add all referenced objects. A map is
maintained to ensure that objects that have already been copied are
not copied again.
|