summaryrefslogtreecommitdiff
path: root/apps/mudraw.c
AgeCommit message (Collapse)Author
2012-09-04Forms: mass renaming for the sake of consistencyPaul Gardiner
2012-08-16Silence some warnings.Robin Watts
Avoid the C++ code complaining about casting string literals to non-const char *'s.
2012-08-08Merge branch 'master' into formsPaul Gardiner
Conflicts: Makefile apps/mudraw.c pdf/pdf_write.c win32/libmupdf-v8.vcproj
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-01Merge branch 'master' into formsPaul Gardiner
Conflicts: pdf/mupdf-internal.h pdf/pdf_font.c
2012-07-27Fix typo in mudraw preventing tracking of slowest page drawSebastian Rasmussen
2012-07-19Improve mudraw generation of .mjs scriptsRobin Watts
Generate example data appropriate to the type of field.
2012-07-05Merge branch 'master' into formsRobin Watts
2012-07-05Move to static inline functions from macros.Robin Watts
Instead of using macros for min/max/abs/clamp, we move to using inline functions. These are more typesafe, and should produce equivalent code on compilers that support inline (i.e. pretty much everything we care about these days). People can always do their own macro versions if they prefer.
2012-06-21Updates for more effective mujstest.Robin Watts
Mudraw is updated so when the -j flag is used it guesses the length of the text it should output for each field. It also outputs a "Lorem Ipsum" string, which should hopefully test the layout facilities a bit better. Mujstest is updated so it can read the escaped chars from that string.
2012-06-20Remove unused variable.Robin Watts
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-14Add -j flag to mudraw; create simple mujstest scripts automatically.Robin Watts
We add a new fz_bound_annots function (and associated pdf_bound_annots function) that calls a given callback with the page rectangle of the annotations on a given page. This is marked as being a 'temporary' function, so we can remove it/change it in future if required. It seems likely that we'll want to have some sort of 'iterate over annotations' function eventually, and this does the job for now. Add a -j flag to mudraw that outputs a simple mujstest script. For each page with annotations, the script jumps to that page, then for each annotation on the page, it sets some text to be entered, and clicks the annotation. In the case of text fields, this will cause the text to be entered into that text field; in the case of buttons it will execute the button. At the end of each page with annotations, the script is told to snapshot the page. These test scripts are not designed to be full tests, but they do at least provide an easy way for us to generate scripts where every field in our test suite is interacted with.
2012-06-12Change mudraw to set the error code if rendering errors present.Robin Watts
Make mudraw pass a cookie in to the rendering procedures. If any errors are reported for any page, remember this, and set the return code to 1 on exit.
2012-05-27Print filenames for fastes/slowest page in mudrawSebastian Rasmussen
2012-05-10Clamp page numbers given to mupdfclean.Sebastian Rasmussen
Also make page specification parsing in all tools look similar.
2012-05-01Always print the file name upon errors in mudraw.Sebastian Rasmussen
2012-04-28Avoid diving by zero in mudraw.Sebastian Rasmussen
2012-04-20Add -ttt into usage string for mudraw.Robin Watts
2012-04-06Bug 692960: Ensure that -g flag overrides filename detectionRobin Watts
Currently the colorspace is selected on detecting -g, but may then be overridden based on the filename; the -g option should be given priority so the fix is simply to move the check for -g down a few lines. Thanks to James Cloos for spotting the problem and suggesting the fix.
2012-03-16Mudraw: Maximum width/height flags.Robin Watts
If -w and/or -h are used at the same time as -r, then treat -w and -h as maximum width/height rather than absolute width/height.
2012-03-14Fix memory leaks in style sheet handling of the new text device.Tor Andersson
2012-03-13Make fz_print functions all take a FILE *.Robin Watts
Also tidy up the taking of fz_context *'s, and hide an unwanted indent param.
2012-03-13Rename some functions and accessors to be more consistent.Tor Andersson
Debug printing functions: debug -> print. Accessors: get noun attribute -> noun attribute. Find -> lookup when the returned value is not reference counted. pixmap_with_rect -> pixmap_with_bbox. We are reserving the word "find" to mean lookups that give ownership of objects to the caller. Lookup is used in other places where the ownership is not transferred, or simple values are returned. The rename is done by the sed script in scripts/rename3.sed
2012-03-12Create style sheet and group extracted text into blocks, lines and spans.Tor Andersson
2012-03-12Merge branch 'header-split'Robin Watts
2012-03-12Add -w, -h and -f options to mudraw.cRobin Watts
Exact width or height values can now be specified to mudraw for output bitmaps. If both are specified the the largest scaling consistent with the aspect ratio not exceeding the given width or height is used, unless the -f flag is specified too, in which case the aspect ratio is ignored and the output 'fits' exactly.
2012-03-12More API work.Robin Watts
Details of buffers hidden in fitz-internal.h. Public API now just lets us keep/drop and get storage details for a buffer. fz_debug_outline{,_xml} lose the 'level' param in their public API. fz_matrix_max_expansion hidden, as it's only used internally. Document fz_setjmp/fz_longjmp and Apple specific hackery.
2012-03-12Merge branch 'master' into header-splitRobin Watts
2012-03-12More API tidying.Robin Watts
Make fz_clone_context copy existing AA settings. Add accessor function for fz_bitmap. Add more documentation for various functions/types.
2012-03-10Make mudraw and the trace device print well-formed XML.Sebastian Rasmussen
2012-03-07Tweak Halftone functionsRobin Watts
A NULL halftone pointer passed to fz_halftone_pixmap is now taken to mean "use the default halftone". This means we can remove most of the halftone functions from the public API until (post 1.0) we decide to flesh out the functionality.
2012-03-07Splitting tweaks.Tor Andersson
2012-03-06Split fitz.h/mupdf.h into internal/external headers.Robin Watts
Attempt to separate public API from internal functions.
2012-02-13Create mudraw; mupdfdraw cloned and adapted to use fz_documentRobin Watts
All in one command line replacement for muxpsdraw and mupdfdraw.