summaryrefslogtreecommitdiff
path: root/apps
AgeCommit message (Collapse)Author
2013-02-06Rename bbox to irect.Tor Andersson
2013-02-06Solve potential problems with partial update.Robin Watts
When we run a display list we pass in an area for fast eliding of objects. Ensure that the area we pass in is always at least as big as the bbox with which we create display devices.
2013-02-06Change to pass structures by reference rather than value.Robin Watts
This is faster on ARM in particular. The primary changes involve fz_matrix, fz_rect and fz_bbox. Rather than passing 'fz_rect r' into a function, we now consistently pass 'const fz_rect *r'. Where a rect is passed in and modified, we miss the 'const' off. Where possible, we return the pointer to the modified structure to allow 'chaining' of expressions. The basic upshot of this work is that we do far fewer copies of rectangle/matrix structures, and all the copies we do are explicit. This has opened the way to other optimisations, also performed in this commit. Rather than using expressions like: fz_concat(fz_scale(sx, sy), fz_translate(tx, ty)) we now have fz_pre_{scale,translate,rotate} functions. These can be implemented much more efficiently than doing the fully fledged matrix multiplication that fz_concat requires. We add fz_rect_{min,max} functions to return pointers to the min/max points of a rect. These can be used to in transformations to directly manipulate values. With a little casting in the path transformation code we can avoid more needless copying. We rename fz_widget_bbox to the more consistent fz_bound_widget.
2013-02-06Fix forgetting to open fz_output for xml output.Robin Watts
2013-02-04Add fz_output, and make output functions use it.Robin Watts
Various functions in the code output to FILE *, when there are times we'd like them to output to other things, such as fz_buffers. Add an fz_output type, together with fz_printf to allow things to output to this.
2013-01-30Rename fz_irect back to fz_bbox.Tor Andersson
2013-01-30Always pass value structs (rect, matrix, etc) as values not by pointer.Tor Andersson
2013-01-30Introduce fz_irect where the old fz_bbox was useful.Tor Andersson
Inside the renderer we often deal with integer sized areas, for pixmaps and scissoring regions. Use a new fz_irect type in these places.
2013-01-30Eliminate fz_bbox in favor of fz_rect everywhere.Tor Andersson
2012-12-24Bug 693503: Fix leak while writing a broken file.Robin Watts
While investigating samples_mupdf_001/2599.pdf.asan.58.1778, a leak showed up while cleaning the file, due to not dropping an object in an error case. mutool clean -dif samples_mupdf_001/2599.pdf.asan.58.1778 leak.pdf Simple Fix. Also extend PDF writing so that it can cope with skipping errors so we at least get something out at the end. Problem found in a test file supplied by Mateusz "j00ru" Jurczyk and Gynvael Coldwind of the Google Security Team using Address Sanitizer. Many thanks!
2012-12-13Bug 693462: Tweak X11 app startup.Robin Watts
A user (stu-mupdf) points out that if winopen fails, we throw an error, which crashes due to the exception stack not having been set up yet. The solution is simply to move pdfapp_init a little earlier.
2012-11-29Bug 693463: Various small fixes.Robin Watts
Thanks to zeniko for these. Use otf as extension for opentype fonts. fz_clampi should take ints, not floats! Fix typo in prototype. Squash unwanted warning. Remove magic number in favour of #define. Reset generation numbers when renumbering.
2012-11-29Bug 693461: Add LL suffix to large number.Robin Watts
Only used in mujstest script generation.
2012-11-28Bug 693452: Memory leak with transitions disabled.Robin Watts
Since adding transition support any page turn has leaked a bitmap image. Don't save the old image unless we are really in transition mode.
2012-11-28Bug 693392: Add \n to some printfs in mujstest.Robin Watts
This stops all the warnings coming out on a single line.
2012-11-27Forms: avoid directly saving to the original filePaul Gardiner
MuPDF needs access to the original file when saving, and in any case directly overwritting the original file has much more potential for data loss than use of a temporary file.
2012-11-20Obsess about whitespace.Tor Andersson
2012-11-16Build on Solaris (10, at least)Chris Liddell
Requires GNU make and gcc.
2012-11-01Forms: extend setFillColor implementation to include text widgetsPaul Gardiner
Also update pdf_dict_puts so that passing NULL to val deletes the terminal key. Update pdfapp.c to update the screen between passing a mouse event and invoking a dialog box for value entry Extend javascript wrapper to handle all color spaces
2012-10-29Support partial update in pdfapp.cPaul Gardiner
2012-10-29Add fz_update_pagePaul Gardiner
Regenerate dirty appearance streams and report changed annotations since last call. Also include a partial revert of changes in 96f335bc, that turn out not to be necessary. fz_update_page must now be called between each document-changing event and the next render. pdfapp.c and the android app have been updated to do so, but do not yet take advantage of the possibility to render only the updated areas of the screen.
2012-10-25Update pdfapp to keep a separate display list for annotationsPaul Gardiner
2012-10-19Fix double free of old image in page transitionsSebastian Rasmussen
2012-10-19Fix bug where X11 motion events were parsed as button eventsSebastian Rasmussen
2012-10-17First steps towards supporting transitions.Robin Watts
Only Fade, Wipe and Blinds supported so far. Hit 'p' in the viewer to go into 'presentation' mode. Page swaps then transition from page to page. Pages auto advance until key or mouse is used.
2012-10-16Forms: avoid the need to reload the page on every changePaul Gardiner
Add pdf_update_annot, which is called before rendering an annotation, and checks that the annotation structure has correct information. There are three reasons the information can be out of date. Attributes of a field may have been changed such that its appearance stream needs updating. In this case the field will have have "Dirty" added to its dictionary The mouse may have changed state over the field, and a different appearance stream needs selecting. The annotation structure now records the mouse states for which the current appearance stream is acceptable. The field may have changed state as recorded by its "AS" value, and a different appearance stream needs selecting.
2012-10-10Add showing of encryption dictionary to pdfshowSebastian Rasmussen
2012-10-10Mention SIGHUP for reloading in manpageSebastian Rasmussen
2012-10-05Rename mubusy to mutool.Tor Andersson
2012-09-25Forms: support doc.mailDoc.Paul Gardiner
2012-09-25Forms: handle app.launchUrl, currently by displaying a warningPaul Gardiner
2012-09-25Forms: show warning for use of app.execDialogPaul Gardiner
app.execDialog looks very difficult to support. Hopefully we wont have to
2012-09-25Forms: handle app.execMenuItem (presently just as a not-supported warning)Paul Gardiner
The name of the menu item is passed, so presumably the app could respond to some of the possibilities.
2012-09-25Avoid possible buffer overflow in pdfapp_warnPaul Gardiner
2012-09-19Forms: handle print request, both from javascript and from named actionPaul Gardiner
Currently the app windows app responds with a message box explaining that the MuPDF library passes print requests to the app, but the app does not implement printing.
2012-09-18Forms: add event handling api and specifically support for javascript alertPaul Gardiner
2012-09-04Forms: mass renaming for the sake of consistencyPaul Gardiner
2012-08-29Merge branch 'master' into formsPaul Gardiner
Conflicts: cbz/mucbz.c pdf/pdf_parse.c pdf/pdf_form.c xps/xps_zip.c
2012-08-23Mupdfinfo: Cope with zero page pdf files.Robin Watts
2012-08-16Bump version numbers to 1.1Tor Andersson
2012-08-16Instead of giving error, throw exception when password is invalidSebastian Rasmussen
Previously this triggered an assertion in the cleanup code when freeing the partially opened document.
2012-08-16Silence some warnings.Robin Watts
Avoid the C++ code complaining about casting string literals to non-const char *'s.
2012-08-16Forms: respond to failed validation in windows appPaul Gardiner
2012-08-08Merge branch 'master' into formsPaul Gardiner
Conflicts: Makefile apps/mudraw.c pdf/pdf_write.c win32/libmupdf-v8.vcproj
2012-08-06Check for a display list before trying to render it in pdfappSebastian Rasmussen
Previously fix 13943b92f10796efb175e769afe5b0aea85d879a introduced continued rendering of further pages for documents where one page failed to load. However, if the entire page tree was missing from a PDF document then no display list would be obtained, yet MuPDF tried to render the display list causing a null pointer dereference. Now, check for a valid display list before trying to render it.
2012-08-06Add option to mudraw to process further files upon errorSebastian Rasmussen
2012-08-06Make use of fz_always instead of repeating code for error and normal pathSebastian Rasmussen
2012-08-06Handle exceptions better in mupdfcleanSebastian Rasmussen
pdf_write_document() may throw an exception and this was uncaught up until now.
2012-08-03Forms: add basic support for choice widgets to the Windows appPaul Gardiner
2012-08-02Forms: implement saving on 'S' keyPaul Gardiner