summaryrefslogtreecommitdiff
path: root/source/tools/murun.c
AgeCommit message (Collapse)Author
2017-03-28Rejig fz_new_device to be fz_new_derived_device.Robin Watts
In keeping with the rest of the code.
2017-03-27Tweak document_writer - don't pass dev back in.Robin Watts
It seems odd for a document writer to pass a device pointer out, and then require it to be passed back in. Hide that in the public API.
2017-03-22Rename fz_putc/puts/printf to fz_write_*.Tor Andersson
Rename fz_write to fz_write_data. Rename fz_write_buffer_* and fz_buffer_printf to fz_append_*. Be consistent in naming: fz_write_* calls write to fz_output. fz_append_* calls append to fz_buffer. Update documentation.
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.
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-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-23js: Add setUserCSS function.Tor Andersson
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-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-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.
2016-10-05Move fz_font definition to be private.Robin Watts
Move the definition of fz_font to be in a private header file rather than in the public API. Add accessors for specific parts of the structure and use them as appropriate. The font flags, and the harfbuzz records remain public. This means that only 3 files now need access to the font implementation (font.c, pdf-font.c and pdf-type3.c). This may be able to be improved further in future.
2016-09-09Fix incorrect type usage.Robin Watts
MSVC is obviously more picky than linux in some cases.
2016-09-08Add options to control heuristics in structured text.Sebastian Rasmussen
2016-09-08JS: Add Path.bound() and Path.transform() similar to JNI.Sebastian Rasmussen
2016-09-01pdf: Load/open streams by indirect reference object when possible.Tor Andersson
2016-08-30js: Add PDFObject.length and PDFObject.push() to handle arrays.Tor Andersson
2016-08-16JS: Push null if image lacks an image mask.Sebastian Rasmussen
2016-08-02JS: Add Path.curveTo*(), similar to JNI.Sebastian Rasmussen
2016-08-02JS: Add several Image.get*() methods similar to JNI.Sebastian Rasmussen
2016-08-02JS: Add Pixmap.getX() and .getY() similar to JNI.Sebastian Rasmussen
2016-07-15Add interface indicating if a document is reflowable.Sebastian Rasmussen
2016-07-13Fix MSVC build of murunRobin Watts
2016-07-12js: Add doc.loadOutline and page.getLinks functions.Tor Andersson
These just convert fz_outline and fz_link into plain JS arrays and objects with no associated native userdata.
2016-07-12js: Check if some arguments exist before converting to boolean/number.Tor Andersson
2016-07-12js: Fix memory leak in new Image().Tor Andersson
2016-07-08Separate close and drop functionality for devices and writers.Tor Andersson
Closing a device or writer may throw exceptions, but much of the foreign language bindings (JNI and JS) depend on drop to never throw an exception (exceptions in finalizers are bad).
2016-07-08js: Add wrapper for fz_stext_page to search, select and copy text.Tor Andersson
2016-07-06Add annotations to murun.Tor Andersson
2016-07-06Fix garbage collection and page grafting for indirect reference chains.Tor Andersson
The mark & sweep pass of garbage collection, and resolving indirect objects when grafting objects was following the full chain of indirect references. In the unusual case where a numbered object is itself only an indirect reference to another object, this intermediate numbered object would be missed both when marking for garbage collection, and when copying objects for grafting. Add a function to resolve only one step for these two uses. The following is an example of a file that would break during garbage collection if we follow full indirect reference chains: %PDF-1.3 1 0 obj <</Type/Catalog /Foo[2 0 R 3 0 R]>> endobj 2 0 obj 4 0 R endobj 3 0 obj 5 0 R endobj 4 0 obj <</Length 1>> stream A endstream endobj 5 0 obj <</Length 1>> stream B endstream endobj
2016-07-06pdf: Drop generation number from public interfaces.Tor Andersson
The generation number is only needed for decryption, and is assumed to be zero or irrelevant for all other uses. Store the original object number and generation in the xref slot, so that we can decrypt them even when the objects have been renumbered, without needing to pass the original object number around through the stream loading APIs.
2016-06-23Update JNI code. Take explicit alpha argument in toPixmap functions.Tor Andersson
2016-06-17Add mediabox argument to fz_new_display_list.Tor Andersson
To return the proper size from fz_bound_display_list, which has been broken since the begin_page device call was removed.
2016-06-17Add device space transform state to draw device.Tor Andersson
Allows us to remove the out parameter 'transform' from fz_begin_page.
2016-06-17Use 'size_t' instead of int as appropriate.Robin Watts
This silences the many warnings we get when building for x64 in windows. This does not address any of the warnings we get in thirdparty libraries - in particular harfbuzz. These look (at a quick glance) harmless though.
2016-06-16Drop save_alpha argument from image writing functions.Tor Andersson
2016-06-16Update getStride and add getAlpha to JS bindings.Tor Andersson
2016-06-06Update MuJS.Tor Andersson
2016-05-30Respect FZ_ENABLE_PDF=0 to allow dropping all PDF specific code in tools.Tor Andersson
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