summaryrefslogtreecommitdiff
path: root/source/tools/murun.c
AgeCommit message (Collapse)Author
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-05-31Avoid double literals causing casts to float.Sebastian Rasmussen
2017-05-19Fix 697898: Typo in iterator in JS Page.getLinks().Tor Andersson
2017-05-08js: Propagate errors from JS devices to fitz.Tor Andersson
2017-04-27Include required system headers.Tor Andersson
2017-04-27Use feature defines in tools.Tor Andersson
If DISABLE_MUTHREADS is set, don't include the thread helper library. If FZ_ENABLE_PDF is 0, don't include mupdf/pdf.h.
2017-04-20js: Push annotation error handling down to library.Sebastian Rasmussen
This makes is possible for JNI code to depend on the library for error handling.
2017-04-20js: Add set/get of interior color of annotations.Sebastian Rasmussen
2017-04-14js: Avoid duplicating cleanup code.Sebastian Rasmussen
2017-04-14js: Deleting an annotation has no return value.Sebastian Rasmussen
2017-03-31Fix typo in PDFAnnotation.setQuadPoints.Tor Andersson
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