summaryrefslogtreecommitdiff
path: root/apps/pdfshow.c
AgeCommit message (Collapse)Author
2012-10-10Add showing of encryption dictionary to pdfshowSebastian Rasmussen
2012-10-05Rename mubusy to mutool.Tor Andersson
2012-01-27Rename pdfdraw to mupdfdraw etc.Robin Watts
This a) improves our branding, and b) avoids conflicts with other pdf tools out there (pdfinfo etc).
2012-01-27Rename pdf_xref type to pdf_document.Tor Andersson
2012-01-19Remove confusing optional 'password' argument to pdf_open_xref.Tor Andersson
Require that clients call pdf_needs_password/pdf_authenticate_password instead. For dumb clients, we still allow for decrypting a file with a blank password without calling those functions.
2012-01-11Use enum for FZ_STORE_DEFAULT default size.Tor Andersson
2012-01-11Set default values for alloc context and max store size if none are given.Sebastian Rasmussen
2012-01-10Automatically load page tree when accessing a page/page count.Sebastian Rasmussen
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-03Add mubusy buildRobin Watts
Add simple combined exe build for mupdf/muxps tools.
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-08Remove deprecated error handling code.Tor Andersson
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.
2011-09-21Add warning context.Tor Andersson
2011-09-21Rename malloc functions for arrays (fz_calloc and fz_realloc).Tor Andersson
2011-09-21Don't thread ctx through safe fz_obj functions.Tor Andersson
2011-09-20Reshuffle exception context code to fit Tor's aesthetic sense.Tor Andersson
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-14Initial import of exception handling codeRobin Watts
Import exception handling code from WSS, modified to fit into the fitz world. With this code we have 'real' fz_try/fz_catch/fz_rethrow functions, handling a fz_except type. We therefore rename the existing fz_throw/ fz_catch/fz_rethrow to be fz_error_make/fz_error_handle/fz_error_note. We don't actually use fz_try/fz_catch/fz_rethrow yet...
2011-04-05Clean up xps and pdf page access functions.Tor Andersson
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-03-06Inhibit warning message spam by introducing a repeat counter.Tor Andersson
2010-12-30Adhere to nil idiom.Sebastian Rasmussen
2010-12-10Sort dictionary keys when printing grepable output in pdfshow.Tor Andersson
2010-12-05Include trailer in grepable output from pdfshow.Sebastian Rasmussen
2010-12-05Add "grepable" command to pdfshow to print all objects on one line each.Tor Andersson
2010-07-29Use chained reader like interface for filters instead of process interface.Tor Andersson
2010-07-17Remove all trailing whitespace.Tor Andersson
2010-07-16Add command to show the page tree in pdfshow.Tor Andersson
2010-07-16Refactor pdf store presence to be optional and use function pointers.Tor Andersson
2010-07-16Clarify function names for opening a PDF file.Tor Andersson
2010-07-15Refactored xref opening functions, command line tools, and rewrote pdfdraw ↵Tor Andersson
to be more illustrative.
2010-06-29Reformat to remove all instances of double spaces (to easier spot ↵Tor Andersson
indentation errors in the future).
2010-06-21Change pdfshow default to print streams decompressed.Tor Andersson
2010-06-21Preload page tree into an array to avoid unnecessary linear searching when ↵Tor Andersson
looking for a given page.
2010-06-15Explicitly return 0 from main() in the tools.Tor Andersson
2010-04-15Change command line flag for the password to -p for all tools.Tor Andersson
2009-11-29Fix up indentation.Tor Andersson
2009-07-05Make internal functions static.Sebastian Rasmussen
2009-07-05Refactor xref opening and closing to a common file for all pdf tools.Sebastian Rasmussen
2009-07-03Use fz_getopt & co.Tor Andersson
2009-07-02Increment reference count of catalog and info objects when opening a pdf.Tor Andersson
2009-06-30Move dynamic objects (fz_obj) out of fitz and into mupdf conceptually. Make ↵Tor Andersson
all fz_obj functions automatically and invisibly resolve indirect references before use.
2009-06-29Attempt to continue is password is missing for pdf debug tools.Sebastian Rasmussen
2009-05-23Removed dumping of images from pdfshow.Sebastian Rasmussen
2009-05-23Fix typos in pdfshow usage text.Sebastian Rasmussen
2009-05-10Properly drop xref when object has been shown.Sebastian Rasmussen
2009-05-03Dump images as pnm if decoded and shown in binary.Sebastian Rasmussen