summaryrefslogtreecommitdiff
path: root/source/tools
AgeCommit message (Collapse)Author
2017-03-20Fix threaded mutool build breakage.Robin Watts
2017-03-15Silence warning.Tor Andersson
2017-03-14Update PWG writer to be a band_writer.Robin Watts
Update mutool to call it.
2017-03-14Recast TGA output as a band writer.Robin Watts
Annoyingly TGA requires lines to be written from bottom to top, so require callers to flip the image. Also fix TGA to cope with alpha or not. Update mutool draw to use band writer interface for TGA.
2017-03-11Simplify fz_band_writer API.Robin Watts
Remove needless parameter passing in fz_band_writer API. We always know the bandstart, so why make the caller keep track of it and pass it in? Similarly, we know when we hit the end of the page, so why require us to trigger the trailer writing manually?
2017-02-21Fix typo in ffi_PDFAnnotation_setColor.Tor Andersson
2017-02-21The 'count' array in pdf_annot_set_ink_list takes number of points.Tor Andersson
Not number of coordinates.
2017-02-20Add no-reuse-images option to SVG device.Tor Andersson
Also add explicit viewBox and width/height to image symbol and use elements, to work around a strange clipping/image scaling issue with firefox.
2017-02-20Add svg writer.Tor Andersson
Now mutool convert can write SVG documents.
2017-02-14Make svg text output format a runtime option.Tor Andersson
2017-02-06Be stricter when parsing OCG selections in mudraw.Sebastian Rasmussen
This avoids allowing 0,z as a valid selection.
2017-02-04Bug 697514: Write SVG output to stdout if no output specified.Sebastian Rasmussen
2017-01-31muraster: When outputting to /dev/null, still free bitmaps.Robin Watts
This was leading to memory leaks on the dev board.
2017-01-17Fix typos.Sebastian Rasmussen
2016-12-27js: Fix allocator callbacks so they don't throw fitz exceptions.Tor Andersson
Valgrind doesn't know realloc(p, 0) is equivalent to free(p), so unfortunately we can't reduce all calls to just realloc().
2016-12-27Strip extraneous blank lines.Tor Andersson
2016-12-19Fix broken mutool draw SVG outputRobin Watts
SVG output in mutool produces a file per page; attempting to reopen the same file each time was tripping the new fz_remove call. Now only open a page at a time.
2016-12-14Let pixmap colorspace conversion create new pixmap.Sebastian Rasmussen
This moves dropping the converted pixmap into fz_convert_pixmap(), which relieves every caller from doing so. Moreover resolution, position and interpolation are kept.
2016-12-14Plug pixmap leak when fz_convert_pixmap() throws.Sebastian Rasmussen
2016-12-14Fix document leak when mutool info throws.Sebastian Rasmussen
2016-12-12Tweak pdf portfolio: automatically use incremental writing.Tor Andersson
Windows cannot remove open files, so we can't save non-incrementally to the same file name as the open document. Force incremental saves if the input and output file names are the same. NOTE: We will also create corrupt files if saving a new document incrementally, so take care not to turn on incremental saves if we have created a new blank document.
2016-12-12Tweak pdf portfolio to create blank portfolios and add multiple entries.Tor Andersson
Will overwrite input file unless a separate output file is specified.
2016-12-12PDF Portfolio support.Robin Watts
New PDF Portfolio manipulation API. Simple mutool 'portfolio' tool for listing/extracting/embedding files.
2016-12-12Fix default output options in pdf create.Tor Andersson
2016-12-08Update pdf_array_put to allow extension.Robin Watts
Previously, attempting to put an object beyond the end of an array would throw an error. Here we update the code to allow objects to be placed *exactly* at the end (i.e. to extend the length by 1). Update js use of pdf_array_put.
2016-11-23Try drawing all pages in a document in mudraw if ignoring errors.Sebastian Rasmussen
2016-11-23js: Add setUserCSS function.Tor Andersson
2016-11-23Add 'X' option to disable document styles.Tor Andersson
2016-11-23Convert mudraw and muraster to use mu-threads.Robin Watts
Saves having the same threading code repeatedly.
2016-11-16pdf: Add 'compressed/raw' flag to pdf_add_stream.Tor Andersson
Also expose the argument to JS and JNI.
2016-11-14Make fz_buffer structure private to fitz.Robin Watts
Move the definition of the structure contents into new fitz-imp.h file. Make all code outside of fitz access the buffer through the defined API. Add a convenience API for people that want to get buffers as null terminated C strings.
2016-11-14Add optional 'object' argument to pdf_add_stream.Tor Andersson
2016-11-11API improvements.Robin Watts
Add missing API comments. Move private definitions to implementation headers or C files. Move internal functions to implementation headers.
2016-11-11Add simple layer configuration feature to mutool draw.Robin Watts
This commit adds a new -y flag to mutool draw. -y takes an additional argument - this can either be a single 'l' meaning "list the layer configs available", or a comma separated list of numbers. The first number in the list says which "layer config" to select. Subsequent numbers identify lines in the config to toggle. For instance I might do: mutool draw -y l -o out.png layers.pdf and this will list me the layer configs in the file (as well as rendering normally). From this I might choose layer config 0: mutool draw -y 0 -o out.png layers.pdf This will select layer config 0, and show a table (max 1 layer per numbered line) that shows which layers are on or off. If I then decide that I want layers 3 and 4 to be toggled from their default state, I can run: mutool draw -y 0,3,4 -o out.png layers.pdf Short of implementing an interactive configuration mode, this is the simplest way to demonstrate the layer functionality.
2016-11-10Add mutool option (-l) for setting the minimum line width.Robin Watts
2016-11-03Fix signed/unsigned and size_t/int/fz_off_t warnings.Robin Watts
All seen in MSVC, mostly in 64bit builds.
2016-10-28Clean up link destination handling.Tor Andersson
All link destinations should be URIs, and a document specific function can be called to resolve them to actual page numbers. Outlines have cached page numbers as well as string URIs.
2016-10-26Introduce options for structured text.Sebastian Rasmussen
2016-10-26js: Handle null for all options supplied as strings.Sebastian Rasmussen
2016-10-18Avoid checking argument to fz_drop_*()/fz_free().Sebastian Rasmussen
As fz_drop_*()/fz_free() all must handle NULL.
2016-10-12Bug 696939: Fix mutool info -I flag.Robin Watts
When using -I without -X we were not seeing the expected images listed. Adopt the solution suggested by the bug reporter. Many thanks!
2016-10-12Change code from using bandheight to using band_height.Robin Watts
Keep to our naming conventions.
2016-10-12Regularize band writer interface.Robin Watts
We have various functions that, for different image formats, write a header, then a band, then (sometimes) a trailer. Push them all through a single interface. This change also fixes potential problems caused by the trailer writing being an implicit destructor, which can cause problems in cleanup code if the trailer writing throws an error.
2016-10-10Bug 697050: Allow mutool extract to keep JPEGs as JPEGs.Robin Watts
If an image is a JPEG (without a mask, or a colorkey, or using decode), then extract it as such.
2016-10-07Add ctx to fz_font functions.Robin Watts
2016-10-07js: Add PDFObject explicit accessors.Tor Andersson
2016-10-07Add annotation editing functions and clean interface of existing ones.Tor Andersson
2016-10-07js: Make PDFDocument, PDFPage, and PDFAnnotation subclasses.Tor Andersson
Add isPDF methods to query availability of PDF specific methods.
2016-10-06Hide internals of fz_colorspaceRobin Watts
The implementation does not need to be in the public API.
2016-10-06Only build murun if we have mujs enabled.Robin Watts
Otherwise we were tripping over the lack of the header file.