summaryrefslogtreecommitdiff
path: root/source/tools
AgeCommit message (Collapse)Author
2014-05-05Fix 695207: printf format bug in mutool info.Tor Andersson
2014-03-25Split mjs script generation to separate tool.Tor Andersson
It has no real reason to live in mudraw, and it does pull in the javascript dependency via pdf-form.c.
2014-03-20Respect reverse page ranges in mutool clean.Tor Andersson
2014-03-19Add routine to clean pdf content streams for pages.Robin Watts
New routine to filter the content streams for pages, xobjects, type3 charprocs, patterns etc. The filtered streams are guaranteed to be properly matched with q/Q's, and to not have changed the top level ctm. Additionally we remove (some) repeated settings of colors etc. This filtering can be extended to be smarter later. The idea of this is to both repair after editing, and to leave the streams in a form that can be easily appended to. This is preparatory to work on Bates numbering and Watermarking. Currently the streams produced are uncompressed.
2014-03-19Make mutool clean sanitise the Dests lists when subsetting.Robin Watts
When you use mutool clean to subset pages out of a PDF, we already remove the Name tree entries for named locations that aren't in the target file. We have henceforth failed to remove references to these removed names though. This can cause errors (really warnings) on reading the file back.
2014-03-13Tweak pdfclean and pdfinfo to be useful as libraries.Robin Watts
Firstly, we remove the use of global variables; this is done by introducing a 'globals' structure for each of these files and passing it internally between functions. Next, split the core of pdfclean_main into pdfclean_clean, and the core of pdfinfo_main into pdfinfo_info. The _main functions now do the argv processing. The new functions now run entirely thread safely, so can be called from library functions.
2014-01-09Add -o option for mutool show.Tor Andersson
Windows doesn't like redirecting binary output, so add an explicit filename argument.
2014-01-07Introduce 'document handlers'.Robin Watts
We define a document handler for each file type (2 in the case of PDF, one to handle files with the ability to 'run' them, and one without). We then register these handlers with the context at startup, and then call fz_open_document... as usual. This enables people to select the document types they want at will (and even to extend the library with more document types should they wish).
2014-01-06fix various MSVC warningsSimon Bünzli
Some warnings we'd like to enable for MuPDF and still be able to compile it with warnings as errors using MSVC (2008 to 2013): * C4115: 'timeval' : named type definition in parentheses * C4204: nonstandard extension used : non-constant aggregate initializer * C4295: 'hex' : array is too small to include a terminating null character * C4389: '==' : signed/unsigned mismatch * C4702: unreachable code * C4706: assignment within conditional expression Also, globally disable C4701 which is frequently caused by MSVC not being able to correctly figure out fz_try/fz_catch code flow. And don't define isnan for VS2013 and later where that's no longer needed.
2013-10-31Add CMYK and CMYK Alpha colorspaces to mudraw options.Tor Andersson
2013-10-31Add CMYK support to PAM output.Tor Andersson
2013-09-30Disable image interpolation with a hint.Robin Watts
Set the hint in mudraw when AA bits is set to 0.
2013-09-27add support for .tga output to mudrawSimon Bünzli
SumatraPDF's testsuite uses Targa images as output because they're compressed while still far easier to compare than PNG and have better tool support than PCL/PWG.
2013-09-06Add '-' as a option for stdout to mudrawRobin Watts
2013-08-30Add simple banding to mudraw.Robin Watts
The most complex part here is to ensure that we can output various bitmaps in bands.
2013-08-28Dump glyph cache size as part of mudraw -MRobin Watts
2013-08-21Add simple memory use tracking to mudrawRobin Watts
2013-08-21Add -F flag to mudraw to allow format selection.Robin Watts
This allows us to "mudraw -F ppm -o /dev/null" etc.
2013-07-26Reword mutool usage text.Tor Andersson
2013-07-25Fix mutool poster operation.Robin Watts
2013-07-24Bug 694429: Fix potential overflows in sprintf in pdfextractRobin Watts
Thanks to Pengsu Cheng for pointing out the problem.
2013-07-11Implement dynamic page tree lookups.Tor Andersson
No more caching a flattened page tree in doc->page_objs/refs. No more flattening of page resources, rotation and boxes. Smart page number lookup by following Parent links. Naive implementation of insert and delet page that doesn't rebalance the trees. Requires existing page tree to hook into, cannot be used to create a page tree from scratch.
2013-07-04Update pdf_write_document to support incremental updatePaul Gardiner
2013-06-26Silence compiler warnings.Tor Andersson
2013-06-25Rid the world of "pdf_document *xref".Robin Watts
For historical reasons lots of the code uses "xref" when talking about a pdf document. Now pdf_xref is a separate type this has become confusing, so replace 'xref' with 'doc' for clarity.
2013-06-25Update pdf_obj's to have a pdf_document field.Robin Watts
Remove the fz_context field to avoid the structure growing.
2013-06-21Initial PDF editing/page creation commitRobin Watts
2013-06-20Rename fz_image_to_pixmap to fz_new_pixmap_from_image.Tor Andersson
Match our naming conventions.
2013-06-20Rearrange source files.Tor Andersson