summaryrefslogtreecommitdiff
path: root/source/tools/pdfmerge.c
AgeCommit message (Collapse)Author
2018-04-24Remove need for namedump by using macros and preprocessor.Tor Andersson
Add a PDF_NAME(Foo) macro that evaluates to a pdf_obj for /Foo. Use the C preprocessor to create the enum values and string table from one include file instead of using a separate code generator tool.
2018-01-31Use convenience pdf dictionary/array creation functions.Tor Andersson
2017-06-03Tweak pdf_graft_map API.Robin Watts
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
2017-04-27Include required system headers.Tor Andersson
2017-04-13Clean up mutool usage messages.Tor Andersson
2016-07-06Start slimming pdf_page.Tor Andersson
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.
2016-07-06pdf: Flatten inheritable page properties when copying pages.Tor Andersson
Affects pdfclean, pdfmerge, and pdfposter.
2016-05-13Fix potential double free in pdfmerge.Tor Andersson
Remove unnecessary extra indirect object; pdf_add_object returns an indirect reference already, so we don't need to duplicate it.
2016-05-13Add common page range parsing function for tools.Tor Andersson
2016-05-13Add long output option parsing.Tor Andersson
Use comma-separated list of flags and key/value pairs, for example: "linearize,resolution=72,colorspace=gray"
2016-04-27Tweak pdf-write option handling.Tor Andersson
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.
2016-04-26pdfmerge: Clean up error messages and fix try/catch variable error.Tor Andersson
2016-04-19Add mutool mergeMichael Vrhel
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.