summaryrefslogtreecommitdiff
path: root/apps/pdfapp.h
AgeCommit message (Collapse)Author
2013-06-20Rearrange source files.Tor Andersson
2013-06-18Merge common and internal headers into one.Tor Andersson
2013-06-18Move header files into separate include directory.Tor Andersson
2013-06-09Remove fz_interactive API in favour of direct use of pdf APIPaul Gardiner
2013-05-22Rewrite pdfapp search to use common search functions.Tor Andersson
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-01-30Eliminate fz_bbox in favor of fz_rect everywhere.Tor Andersson
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-10-25Update pdfapp to keep a separate display list for annotationsPaul Gardiner
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-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-08-16Forms: respond to failed validation in windows appPaul Gardiner
2012-08-03Forms: add basic support for choice widgets to the Windows appPaul Gardiner
2012-08-02Forms: add support for save on exit to the windows appPaul Gardiner
2012-06-20Add better mechanism for enumerating annotation rectangles.Robin Watts
Rather than having a dedicated call to enumerate the rectangles for the annotations on a page, add an interface for enumerating annotations with accessor functions. Currently the only accessor function is the one to get the annotation rectangle. Use this new scheme in place of fz_bound_annots within mudraw. Also use this scheme to set the caret cursor in the viewer when over a data field.
2012-06-15Add colorspace entry to pdfapp_s to set default colorspace.Robin Watts
This is initialised to rgb or bgr according to whether _WIN32 is set as has always been the case. This allows apps that want to override it (such as mujstest) to do so though.
2012-06-14First version of mujstest-v8.pdf and associated solution changes.Robin Watts
Simple command line tool made from cutting all the windows specifics out of win_main.c and adding a simple script handler in. Read lines from the script, and feed those events to pdfapp. Screenshot pages as required.
2012-06-13Merge branch 'master' into formsPaul Gardiner
Conflicts: fitz/fitz-internal.h fitz/stm_buffer.c pdf/mupdf-internal.h
2012-06-11Fix Bug 693099: Render failure due to corrupt jpeg data.Robin Watts
The file supplied with the bug contains corrupt jpeg data on page 61. This causes an error to be thrown which results in mudraw exiting. Previously, when image decode was done at loading time, the error would have been thrown under the pdf interpreter rather than under the display list renderer. This error would have been caught, a warning given, and the program would have continued. This is not ideal behaviour, as there is no way for a caller to know that there was a problem, and that the image is potentially incomplete. The solution adopted here, solves both these problems. The fz_cookie structure is expanded to include a 'errors' count. Whenever we meet an error during rendering, we increment the 'errors' count, and continue. This enables applications to spot the errors count being non-zero on exit and to display a warning. mupdf is updated here to pass a cookie in and to check the error count at the end; if it is found to be non zero, then a warning is given (just once per visit to each page) to say that the page may have errors on it.
2012-05-08Forms: add text input dialog to win32 appPaul Gardiner
2012-05-08Forms: inhibit "wait" cursor when updating display just for a form changePaul Gardiner
2012-04-20Pass UTF8 filename to fz_open_document / fz_open_file to remove kludges.Tor Andersson
Use _wopen on a UTF8 -> wchar_t decoded filename to support UTF8 filenames for win32.
2012-03-19Add simple 'inverted color' mode for mupdf viewer.Robin Watts
Use 'i' to toggle inversion of the rendered MuPDF bitmap, giving simple 'white on black' mode.
2012-03-12Create style sheet and group extracted text into blocks, lines and spans.Tor Andersson
2012-03-07Splitting tweaks.Tor Andersson
2012-02-03Use the new document interface in viewer.Tor Andersson
2012-01-30Add CBZ (comic book zip-file) parser.Tor Andersson
2012-01-27Rename pdf_xref type to pdf_document.Tor Andersson
2012-01-18Add fullscreen mode to mupdf viewer.Tor Andersson
Toggle with 'f'. Fullscreen turns off shrinkwrap, and shrinkwrap turns off fullscreen.
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-11Hide glyph cache in context.Tor Andersson
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-08Remove deprecated error handling code.Tor Andersson
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-09-21Rename xps_context to xps_document.Tor Andersson
2011-09-17Implement backwards search in viewer.Sebastian Rasmussen
2011-09-15Add context to mupdf.Robin Watts
Huge pervasive change to lots of files, adding a context for exception handling and allocation. In time we'll move more statics into there. Also fix some for(i = 0; i < function(...); i++) calls.
2011-09-04Repaint only viewer search area when editing search string.Sebastian Rasmussen
2011-08-30Do not change view when reloading file.Bert
2011-05-26Flip pages when panning beyond threshhold.Cedric Sodhi
Added BEYOND_TRESHHOLD for pdfapp and code which flips to next/previous page if one pans beyond the page end plus that threshhold.
2011-04-04Le Roi est mort, vive le Roi!Tor Andersson
The run-together words are dead! Long live the underscores! The postscript inspired naming convention of using all run-together words has served us well, but it is now time for more readable code. In this commit I have also added the sed script, rename.sed, that I used to convert the source. Use it on your patches and application code.
2011-04-01apps: Add XPS support to mupdf viewer.Tor Andersson
2011-03-03Update version numbers.Tor Andersson
2011-01-06Remove unnecessary whitespace.Sebastian Rasmussen
2010-12-30Remove unimplemented and unused declarations.Sebastian Rasmussen
2010-06-29Add key 'c' to toggle between color and greyscale in both X11 and Windows ↵Robin Watts
viewers.
2010-06-23Update windows viewer to add the search functionality.Tor Andersson
2010-06-21Implement searching for text within the current page.Tor Andersson