summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Collapse)Author
2016-12-12PDF Portfolio support.Robin Watts
New PDF Portfolio manipulation API. Simple mutool 'portfolio' tool for listing/extracting/embedding files.
2016-12-12Add fz_remove to cope with utf-8 file names on windows.Tor Andersson
2016-12-12Ensure we don't clobber files in fz_new_output_with_path.Tor Andersson
When saving a PDF to the same file name as the one that is open, we risk clobbering it by truncating the source file. Remove the old file first! Removing an open file will not work on windows, but there we will throw an EACCESS error rather than clobber the file!
2016-12-12Fix default output options in pdf create.Tor Andersson
2016-12-12pdf: Fix bug 697431.Tor Andersson
We were incorrectly calling pdf_update_object to try to make sure that an edited array was going to be saved during incremental saves. This call was both buggy and unnecessary.
2016-12-12pdf: Add missing prepare_object_for_alteration calls.Tor Andersson
pdf_array_delete and pdf_dict_put_val_null weren't calling this function.
2016-12-12Change pdf_dict_put_val to pdf_dict_put_val_null.Tor Andersson
It's only used to 'fix' duff indirect references when cleaning PDF files. Writing general values into dictionaries should be done by key, not by internal index.
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-12-08Fix incorrect recursive object marking.Robin Watts
We use pdf_mark_obj/pdf_unmark_obj to catch cycles when traversing PDF structures. In some cases we were failing to actually test the return code, making it pointless.
2016-11-23Add ptrdiff_t formatting support to fz_vsnprintf().Sebastian Rasmussen
2016-11-23fz_vsnprintf() can simply use bitwidth of given types.Sebastian Rasmussen
2016-11-23Fix object leak in pdf_array_put_drop() and pdf_dict_put_val_drop().Sebastian Rasmussen
2016-11-23jxr: Plug pixmap leak upon error converting CMYK image to RGB.Sebastian Rasmussen
2016-11-23Try drawing all pages in a document in mudraw if ignoring errors.Sebastian Rasmussen
2016-11-23Fix mu-threads build on linux.Tor Andersson
2016-11-23js: Add setUserCSS function.Tor Andersson
2016-11-23Add 'X' option to disable document styles.Tor Andersson
2016-11-23Add toggle to enable/disable document styles.Tor Andersson
2016-11-23Update UCDN database to Unicode 9.0.0.Sebastian Rasmussen
2016-11-23Fix sorting of cmap lists.Tor Andersson
Sorting with LC_ALL set to anything other than "C" is folly!
2016-11-23Convert mudraw and muraster to use mu-threads.Robin Watts
Saves having the same threading code repeatedly.
2016-11-23First version of mu-office-lib.Robin Watts
2016-11-23Move threading macros out into a mu-threads helper file.Robin Watts
2016-11-23Fix pdf-write bug when ascii encoding.Robin Watts
2016-11-22Rearrange CMap resources. Only include the ones that are used.Tor Andersson
Silences unused variable warnings on gcc.
2016-11-22Fix fz_warn() format compiler warning.Sebastian Rasmussen
2016-11-22Fix const compiler warning.Sebastian Rasmussen
2016-11-21Fix a few cases where pdf_unmark_obj wasn't always being called on errors.Tor Andersson
2016-11-21Harden viewers against failures when loading outlines.Tor Andersson
Ignore invalid page references in outlines. This was shown by a file that had [null 0 0 1] as a link dest. Attempting to parse that threw an error, which caused the whole outline load to fail.
2016-11-17Rename openssl flags to libcrypto.Sebastian Rasmussen
Only libcrypto is used to do checking of digital signatures. The SSL library openssl is never used.
2016-11-16pdf: Add x and y output parameters to pdf_lookup_anchor.Tor Andersson
2016-11-16Bug 697301: Fix "crash" in epub.Robin Watts
Actually an assert. This is caused by a paragraph separator in the text. The Unicode Bidirectional Algorithm says we should operate paragraph by paragraph, and includes code to split paragraphs at paragraph markers, changing their type to boundary neutrals as it goes. The use of this code was left "as an exercise for the reader" in the example code, so we simply hook it up here.
2016-11-16pdf: Use '#page=N' for remote destination pages.Tor Andersson
As per Adobe's recommendation: https://helpx.adobe.com/acrobat/kb/link-html-pdf-page-acrobat.html
2016-11-16Fix 697335: Handle links with content in nested tag.Tor Andersson
We would not create a link box for the "bar" text in links of the form: <a href="foo"><span>bar</span></a>.
2016-11-16Fix warning.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-15move the definition of GSDLLCALL to a different spot, above where it'sFred Ross-Perry
first used.
2016-11-15Fix compiler warning.Robin Watts
's' is char * and unsigned char * is expected.
2016-11-14pdf: Don't pass form UI events to link annotations.Tor Andersson
Don't try handling them both as links and form widgets.
2016-11-14pdf: Use URI dictionary for relative URIs.Tor Andersson
2016-11-14Fix return in void function.Tor Andersson
2016-11-14Continued Layer API work.Robin Watts
Hide pdf_is_hidden_ocg from the public interface. Ensure that RBGroups and Order properly fall back to the default entries if they are missing in the OCCDs. Add pdf_set_layer_config_as_default. This sets the default layer config to be current one. This destroys the current default dictionary, but we leave the other configs intact.
2016-11-14More API tweaks.Robin Watts
Move internal functions from public to private headers.
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-14Workaround 0 line-width strokes in svg output.Robin Watts
A line width of 0 has special meaning in PDF files. SVGs don't understand it, so modify our SVG output device to send all line widths smaller than 1 as being 1.
2016-11-14Add/fix page coordinates to link targets.Tor Andersson
Correctly transformed target coordinates for PDF. Target coordinates for EPUB and HTML.
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-11Add pdf_layer configuration API.Robin Watts
Add API to: * allow enumeration of layer configs (OCCDs) within PDF files. * allow selection of layer configs. * allow enumeration of the "UI" (or "Human readable") form of layer configs. * allow selection/toggling of entries in the UI.