summaryrefslogtreecommitdiff
path: root/apps
AgeCommit message (Collapse)Author
2012-01-18Add fullscreen mode to mupdf viewer.Tor Andersson
Toggle with 'f'. Fullscreen turns off shrinkwrap, and shrinkwrap turns off fullscreen.
2012-01-12Update copyright notices for 2012.Tor Andersson
2012-01-12Use the same coordinate system for pdf and xps pages in the interface.Tor Andersson
Move coordinate space tweaks into pdf_ and xps_run_page, and provide neutral pdf_ and xps_bound_page functions to return the page size as a zero-origined bounding box.
2012-01-11Add xps_run_page function.Tor Andersson
2012-01-11Use enum for FZ_STORE_DEFAULT default size.Tor Andersson
2012-01-11Hide glyph cache in context.Tor Andersson
2012-01-11Set default values for alloc context and max store size if none are given.Sebastian Rasmussen
2012-01-11Do not unnecessarily use O_BINARY in X11 viewer.Sebastian Rasmussen
2012-01-10Automatically load page tree when accessing a page/page count.Sebastian Rasmussen
2012-01-10Fix many spelling errors.Sebastian Rasmussen
2012-01-09Add fz_try/fz_catch to xpsdrawRobin Watts
Avoid unhandled exceptions. Thanks to Zeniko for this.
2012-01-06pdfshow; cope better with broken objectsRobin Watts
In pdfshow, if we fail to parse an object, just skip it rather than aborting. Thanks to Zeniko for the suggestion.
2012-01-06pdfclean; trailer dictionary expansion fixRobin Watts
The logic controlling whether to expand a trailer dictionary or not was reversed. Fixed here. Thanks to Zeniko for pointing this out.
2012-01-04Bug 692739: Add ability to abort time consuming actionsRobin Watts
A new 'cookie' parameter is added to page rendering/interpretation functions. Supply this as NULL to get existing behaviour. If you supply a non-NULL cookie, then this is taken as a pointer to a struct that can be used for simple, non-thread locked communication between caller and library. The entire struct should be memset to zero before entry, except for specific flags (thus coping with future extensions to this struct). The abort flag should be zero on entry. It will be checked periodically by the library - if the caller sets it non-zero (via another thread) then the current operation will be aborted. No guarantees are given as to how often this will be checked, or how fast it will be responded to. The progress_max field will be set to an integer (-1 for unknown) representing the number of 'things' to do. The progress field will count up from 0 to this number as time goes by. No guarantees are made as to the accuracy of this information, but it should be useful for offering some sort of progress bar etc. Note that progress_max may increase during the job. In general, callers should be careful to accept out of range or invalid data in this structure as this is deliberately accessed 'unlocked'.
2012-01-03Add mubusy buildRobin Watts
Add simple combined exe build for mupdf/muxps tools.
2011-12-30Load outlines in viewer after pages to allow links to work.Robin Watts
In order for hyperlinks to work, we need to load the outlines after the pages tree.
2011-12-28Outline/link destination tweaks.Robin Watts
Move 'kind' into the fz_link_dest structure (as this makes more sense). Put an fz_link_dest rather than just a page number into the outlines structure. Correct parsing of actions and dests from pdf outlines.
2011-12-23Generalise pdf_links to be fz_links.Robin Watts
Move to a non-pdf specific type for links. PDF specific parsing is done in pdf_annots.c as before, but the essential type (and handling functions for that type) are in a new file fitz/base_link.c. The new type is more expressive than before; specifically all the possible PDF modes are expressable in it. Hopefully this should allow XPS links to be represented too.
2011-12-17Memory squeezing fixRobin Watts
2011-12-16Another memsqueezing fix.Robin Watts
2011-12-16More memsqueezing fixesRobin Watts
2011-12-15Various Memsqueezing fixes.Robin Watts
Fixes for leaks (and SEGVs, division by zeros etc) seen when Memsqueezing.
2011-12-15Fix warnings/errors on unix builds.Robin Watts
Fix warnings/errors thrown up by the last few commits (which were only tested on windows).
2011-12-15Add scavenging functionality.Robin Watts
When fz_malloc (etc) are about to fail, we try to scavenge memory from the store and then retry. We repeatedly try to bin objects from the store until the malloc succeeds, or until we have nothing else to bin. This means we no longer need the 'aging' of the store, so this is removed.
2011-12-15Remove 'soft limit' on pixmaps in favour of fz_store.Robin Watts
Change the fz_store to be limited to 256 Megs. Remove the soft limit for pixmaps; the store will automatically throw old resources away to stay below the limit.
2011-12-15Rework pdf_store to fz_store, a part of fz_context.Robin Watts
Firstly, we rename pdf_store to fz_store, reflecting the fact that there are no pdf specific dependencies on it. Next, we rework it so that all the objects that can be stored in the store start with an fz_storable structure. This consists of a reference count, and a function used to free the object when the reference count reaches zero. All the keep/drop functions are then reimplemented by calling fz_keep_sharable/fz_drop_sharable. The 'drop' functions as supplied by the callers are thus now 'free' functions, only called if the reference count drops to 0. The store changes to keep all the items in the store in the linked list (which becomes a doubly linked one). We still make use of the hashtable to index into this list quickly, but we now have the objects in an LRU ordering within the list. Every object is put into the store, with a size record; this is an estimate of how much memory would be freed by freeing that object. The store is moved into the context and given a maximum size; when new things are inserted into the store, care is taken to ensure that we do not expand beyond this size. We evict any stored items (that are not in use) starting from the least recently used. Finding an object in the store now takes a reference to it already. LOCK and UNLOCK comments are used to indicate where locks need to be taken and released to ensure thread safety.
2011-12-12Add -i and -f flags to pdfclean.Robin Watts
Update pdfclean with some new decompression options; -d changes it's definition (though not it's behaviour) to mean "decompress all streams". New flags, -i and -f toggle the decompression of image and font streams respectively.
2011-12-09Fix missing " in win_main.cRobin Watts
2011-12-08Stylistic changes when testing pointer values for NULL.Tor Andersson
Also: use 'cannot' instead of 'failed to' in error messages.
2011-12-08Remove deprecated error handling code.Tor Andersson
2011-12-08Use context in x11_main.Tor Andersson
2011-12-08Throw exceptions for read errors.Tor Andersson
2011-12-08Fix exception handling in pdfdraw to avoid leaks.Robin Watts
Remove use of 'die', in place of proper exception handling.
2011-12-08Merge branch 'master' into contextRobin Watts
2011-12-08Undo pre-multiplied alpha when saving PNG with alpha channels.Tor Andersson
2011-12-07Fix mismerge, causing error on closedown of mupdf.exe.Robin Watts
At some point I'd mismerged some code for handling app->doctitle, resulting in app->doctitle pointing to something that's not a heap block. This caused an error when app->doctitle was freed at closedown. Remove the offending code and all is well.
2011-12-06Move antialias levels into context.Robin Watts
In builds that support configurable layers of antialiasing, move the variables that control this into the context. This makes it possible to safely use different levels of antialiasing in different threads.
2011-11-25Merge branch 'master' into contextRobin Watts
2011-11-22Fix bug where app->doctitle wasn't pointing to an alloced string.Tor Andersson
2011-11-17Bug 692487: Make pdfclean keep internal links where possible.Robin Watts
Take on a (cosmetically tweaked) version of Zenikos patch to allow pdfclean to keep link destinations that are in preserved pages.
2011-11-17Fix bug 692627; pdfclean -ggg of encrypted files fails.Robin Watts
Encryption bakes the object numbers into the strings/streams. This means that our renumbering technique falls down; when we move an object to its new position, then come to read it, we find that it decrypts badly. The fix here is (as suggested by Zeniko) to avoid renumbering when encryption is in use.
2011-11-15Merge branch 'master' into contextRobin Watts
Mostly redoing the xps_context to xps_document change and adding contexts to newly written code. Conflicts: apps/pdfapp.c apps/pdfapp.h apps/x11_main.c apps/xpsdraw.c draw/draw_device.c draw/draw_scale.c fitz/base_object.c fitz/fitz.h pdf/mupdf.h pdf/pdf_interpret.c pdf/pdf_outline.c pdf/pdf_page.c xps/muxps.h xps/xps_doc.c xps/xps_xml.c
2011-11-10Add XPS outline parsing and move outline data struct to fz_outline.Tor Andersson
2011-10-12Make sure PDF title is always an allocated string.Sebastian Rasmussen
Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
2011-10-12Add pdfdraw option to print the table of contents / outline.Tor Andersson
2011-10-12Make entering search terms not interfere with page number drawing.Sebastian Rasmussen
2011-10-12Default to opening URIs with xdg-open instead of open in X11 viewer.Sebastian Rasmussen
Based on a patch by Zhihao Yuan <lichray@gmail.com>.
2011-10-12Ask for screen resolution in X11 viewer.Sebastian Rasmussen
Based on a patch by Zhihao Yuan <lichray@gmail.com>.
2011-10-04Reintroduce alloc context section.Robin Watts
This was removed during a previous commit to make the editing easier. Now added back in.
2011-10-04Move to exception handling rather than error passing throughout.Robin Watts
This frees us from passing errors back everywhere, and hence enables us to pass results back as return values. Rather than having to explicitly check for errors everywhere and bubble them, we now allow exception handling to do the work for us; the downside to this is that we no longer emit as much debugging information as we did before (though this could be put back in). For now, the debugging information we have lost has been retained in comments with 'RJW:' at the start. This code needs fuller testing, but is being committed as a work in progress.