summaryrefslogtreecommitdiff
path: root/source/tools
AgeCommit message (Collapse)Author
2016-06-16Update getStride and add getAlpha to JS bindings.Tor Andersson
2016-06-14Fix typos in various parts of the code.Sebastian Rasmussen
2016-06-08Move to using size_t for all mallocs.Robin Watts
This has knock on effects in the store. fix
2016-06-06Update MuJS.Tor Andersson
2016-06-06Add FZ_ENABLE_JS configuration define.Tor Andersson
2016-05-31Update test device with passthrough option.Robin Watts
Update the test device so it can be used 'wrapping' another device. In particular, it can be used to wrap the display list device so that we can evaluate 'color or not' while building the display list rather than having to rerun the display list afterwards. Also, give improved control over whether we test every pixel of images/shadings.
2016-05-30Respect FZ_ENABLE_PDF=0 to allow dropping all PDF specific code in tools.Tor Andersson
2016-05-27Mudraw: Move halftoning into render threads.Robin Watts
2016-05-26Bug 696803: Fix pam output.Robin Watts
PAM output was broken in the absence of alpha. Fixed now.
2016-05-24fz_pixmap revamp: add stride and make alpha optionalRobin Watts
fz_pixmaps now have an explicit stride value. By default no change from before, but code all copes with extra gaps at the end of the line. The alpha data in fz_pixmaps is no longer compulsory. mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw). Update halftone code to not expect alpha plane. Update PNG writing to cope with alpha less input. Also hide repeated params within the png output context. ARM code needs updating.
2016-05-20murun: Add Buffer#writeBuffer to allow for concatenating buffers.Tor Andersson
2016-05-20murun: Add graftObject to javascript bindings.Tor Andersson
Add some paranoid checks to pdf_graft_object to prevent user errors from crashing mupdf.
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-13murun: Add document writer object.Tor Andersson
2016-05-13Add pdf write support to mutool convert.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-05-13Update MuJS.Tor Andersson
2016-05-13Introduce a general output context.Sebastian Rasmussen
This makes it possible to redirect standard out and standard error output streams to output streams of your liking. This means that now you can, in gdb, type: (gdb) call pdf_print_obj(ctx, fz_stdout(ctx), obj, 0) (gdb) call fflush(0) or when dealing with an unresolved indirect reference: (gdb) call pdf_print_obj(ctx, fz_stdout(ctx), pdf_resolve_indirect(ctx, ref), 0) (gdb) call fflush(0)
2016-05-12Fix Mudraw timings when using -P (bgprint).Robin Watts
Calculations need to be done differently.
2016-05-12Fix race condition in bgprint.Robin
There was a race condition on bgprint.pagenum that could cause the bgprint worker to close down early, leaving the main thread waiting for notification of its closedown.
2016-05-09First implementation of parallel rendering ("bgprint")Robin Watts
Add -P flag to mudraw to do 'parallel' rendering. We shift rendering onto a background thread, so that the main thread can continue interpreting page n+1 while page n is being rendered. To do this, we extract the core of the drawpage routine into 'dodrawpage', and either call it directly (in the normal case) or from a bgprint worker thread (in the parallel case). The threading construction exactly parallels that of the threaded band rendering. We have a semaphore to start the render process, a semaphore to indicate when the process has stopped, and the thread itself. The most complex thing here is the rejigging of the printfs required to ensure that we still get the timings displayed in a sane way.
2016-05-04Avoid using unnamed semaphores.Robin Watts
Apparently neither OSX nor iOS support unnnamed semaphores, so steal the gs versions and use them instead.
2016-04-28Partial image decode.Robin Watts
Update the core fz_get_pixmap_from_image code to allow fetching a subarea of a pixmap. We pass in the required subarea, together with the transformation matrix for the whole image. On return, we have a pixmap at least as big as was requested, and the transformation matrix is updated to map the supplied area to the correct place on the screen. The draw device is updated to use this as required. Everywhere else passes NULLs in, and so gets unchanged behaviour. The standard 'get_pixmap' function has been updated to decode just the required areas of the bitmaps. This means that banded rendering of pages will decode just the image subareas that are required for each band, limiting the memory use. The downside to this is that each band will redecode the image again to extract just the section we want. The image subareas are put into the fz_store in the same way as full images. Currently image areas in the store are only matched when they match exactly; subareas are not identified as being able to use existing images.
2016-04-28Mudraw: In low memory mode, flush the store after each page.Robin Watts
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-27murun: Add pdf.deleteObject().Tor Andersson
2016-04-27Add fz_close_device function.Tor Andersson
Garbage collected languages need a way to signal that they are done with a device other than freeing it. Call it implicitly on fz_drop_device; so take care not to call it again in case it has been explicitly called already.
2016-04-27Fix 696649: remove fz_rethrow_message calls.Tor Andersson
2016-04-26Mudraw: Set AA level in context before cloning context.Robin Watts
When we clone the context, we copy the AA levels from the base context into the cloned context. This means that we must set the AA levels in the base context BEFORE cloning if we want them to be the same everywhere (or set them explicitly in all contexts).
2016-04-26Allow text/graphics aa levels to be controlled separately.Robin Watts
2016-04-26murun: Don't use 'mupdf' object; make constructors and functions global.Tor Andersson
It's a lot of extra typing to prefix everything with "mupdf.".
2016-04-26murun: Print result of evaluating a line in interactive mode.Tor Andersson
2016-04-26murun: Support 'lineCap' to set start, end and dash caps together.Tor Andersson
2016-04-26murun: Automatically convert object argument to obj.writeObject().Tor Andersson
2016-04-26murun: Add wmode and bidi-level arguments to text walker callback.Tor Andersson
2016-04-26Change order of arguments to pdf_add_page etc.Tor Andersson
Resources are defined before they are used; so it's only logical to have the resource dictionary before the content buffer in the argument list.
2016-04-26pdfmerge: Clean up error messages and fix try/catch variable error.Tor Andersson
2016-04-26Add 'mutool convert' and new document writer interface.Tor Andersson
Only supports CBZ writing for now. Also add a zip file writer.
2016-04-22pdf: Remember to drop objects inserted into dicts.Sebastian Rasmussen
2016-04-21Fix potential segfault when mapping JS strings to PDF.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.
2016-04-05Add 'Low Memory' mode to Mutool draw.Robin Watts
If used, PDF objects are cleared at the end of each page, and the store size is set to 1 byte, avoiding the caching of images. This trades repeated decoding of images/reading of file objects for memory usage. The purpose of this is to enable measurements to be made on the minimum possible memory level.
2016-04-05Add threaded operation to mudraw.Robin Watts
2016-04-05Clean up bidi enum names.Tor Andersson
And use the same enum for both the internal bidi code and the layout code.
2016-03-31Initialize pdf write options to zero in pdfclean.Tor Andersson
2016-03-31Initialize disabled document writing flags to zeroSebastian Rasmussen
Also remove redundant assignments. Fixes http://bugs.ghostscript.com/show_bug.cgi?id=695968
2016-03-25Fix PS output banded mode operation.Robin Watts
2016-03-25Refactor pcl output to work in bands.Robin Watts
2016-03-25Tweak the PCL page size handling/options.Robin Watts
Introduce a 'generic' PCL setting (basically ljet4 with custom page sizes for now). Ensure we send explicit sizes before the custom page sizes, and don't use Ricoh page sizes unless we are allowed to.