summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-05-28Further fix for Bug 695260: Cope with out of memory in fz_draw_end_maskRobin Watts
If we hit an out of memory error in fz_draw_end_mask, then pop the stack, and rethrow. Ensure that the generic device code catches this error and sets the error_depth to 1 so that the final pop is ignored.
2014-05-28Save a bookmark before jumping when using the 'g' command.Tor Andersson
2014-05-27Fix 693517: Support /SMask/Matte preblended images.Tor Andersson
2014-05-27Fix 693494: Support media buttons for navigation on X11.Tor Andersson
2014-05-27Fix 694518: Implement continuous scrolling with keyboard.Sebastian Neuser
2014-05-27Set a faster default transition.Tor Andersson
2014-05-27Fix 694579: Implement "zoom to fit page".Sebastian Neuser
Add a new function pdfapp_autozoom to fit the page to the window by comparing the aspect ratios of the page and the window to choose whether to fit horizontally or vertically.
2014-05-27Bug 695260: Fix error handling in do_xobjectRobin Watts
Various functions (such as fz_begin_group) handle errors internally by use of the error_depth parameter. This means that if we call them, we MUST ensure that we call the appropriate closing function. Similarly, if we don't call them, we should NOT call the closing function. In order to ensure we do this correctly, we introduce a cleanup_state variable that says which ones we tried to call. This cures the original bug.
2014-05-26Fix 695261: separate TM and CTM in outline extraction and stroking steps.Tor Andersson
We used to extract the outline using the combined TM*CTM matrix and use the identity transform for stroking, thus ending up with the wrong line width. If we instead extract using the TM and then stroke with the CTM we get the correct results.
2014-05-23Fix 695041: add special fast case for 8bpp TIFF predictor.Tor Andersson
2014-05-23Add ftdebug.c to thirdparty freetype build.Tor Andersson
Allows compilation with -DFT_DEBUG_LEVEL_TRACE to track down buggy fonts.
2014-05-23Bug 695183: Inflate large buffers at a time for speed.Robin Watts
When I changed the stream implementations to use implementation specific buffers, rather than a generic public one in every fz_stream, I changed fz_read_byte to only get a single byte at a time. I noted at the time that the underlying stream was free to decode larger blocks if it wanted too, but I forgot to actually do this for the flate decoder. Fixing this here should solve the speed issues.
2014-05-22Flush pending text on a change of CTM.Robin Watts
Without this, comparefiles/Bug695086 renders the barcode test upside down.
2014-05-22Fix windows VS builds.Robin Watts
Fix broken solution file and add project entries for new files.
2014-05-22Fix 695222: Treat non-breaking space (U+00A0) as white space for search.Tor Andersson
2014-05-22Fix 695247: Use exponential realloc pattern and qsort for huge paths.Tor Andersson
Grow the edge list using an exponential realloc pattern. Use qsort for huge paths and only fall back to the simple shell sort for small paths.
2014-05-22Load the usecmap directives recursively for builtin CMaps.Tor Andersson
Fixes bug introduced in commit 1679c1e7a89ae62260fd84ce55c6bef376c6e6ba: Optimize UniXXX CMap files.
2014-05-20Build libcurl as part of the 'make third' rule...Tor Andersson
...without adding it to the standard list of required third party dependencies.
2014-05-19Remove jmorecfg.h from includes.Chris Liddell
2014-05-19Add an application agnostic memory handler for libjpegChris Liddell
This adds a custom memory management layer between libjpeg and the calling app - in such a way that the code can be shared between mupdf and Ghostscript/PDL.
2014-05-19Fix 694952: Limit Type 3 font glyph bbox size.Tor Andersson
Don't let a glyph's bbox be too much bigger than the font bbox.
2014-05-19Make unresolvable link destinations warnings instead of errors.Tor Andersson
See bug 693314 (file Z23-04.pdf) for an example file.
2014-05-15Fix 695101 and 694114: Use the correct numbers to validate the encryption ↵Tor Andersson
key length. This reverts commit b1ed116091b790223a976eca2381da2875341e10. The key length for V==2 must be 40 <= length <= 128. The key length for V==4 is not taken from the /Length entry.
2014-05-13Use code space ranges when remapping ToUnicode CMaps.Tor Andersson
2014-05-13Fix signedness in cmap interface.Tor Andersson
2014-05-12better buffer underflow protection for ba15a8cd3238a3a3c098ad8b7d96cb0e405fc26fSimon Bünzli
2014-05-12correctly bound image mask clippings in bbox deviceSimon Bünzli
Same as for fz_bbox_fill_image_mask, fz_bbox_clip_image_mask must transform the unit rectangle to get the bounding bbox.
2014-05-12prevent indeterminacy by uninitialized variablesSimon Bünzli
There are two issues where variables may be used unitialized: * extract_exif_resolution fails to set xres and yres for JPEG images if there's no valid resolution unit (mainly affects XPS documents) * xps_measure_font_glyph uses hadv and vadv unitialized if the glyph id isn't valid (i.e. if FT_Get_Advance fails)
2014-05-12Fix 695156: Display metadata with SetDlgItemTextW.Tor Andersson
Convert from UTF-8 to UCS-2 to display unicode text properly.
2014-05-11Add cmap cleaning scripts.Tor Andersson
One to write a CMap out in expanded form ready for text processing tools. Another to write a CMap out as compactly as possible. The output is not in proper CMap format and can only be parsed by MuPDF.
2014-05-11Optimize UniXXX CMap files.Tor Andersson
Split common parts into separate CMap files and include them with usecmap. This reduces the size of the compiled in CMap resources from 3Mb to 2Mb.
2014-05-10Fix stack overflow in fz_vfprintf.Tor Andersson
Thanks to Triet Lai.
2014-05-10Fix 694698: Support 32-bit values in CMaps.Tor Andersson
Increasing the existing data structure to 32-bit values would bloat the data tables too much. Simplify the data structure and use three separate range tables for lookups -- one with small 16-bit to 16-bit range lookups, one with 32-bit range lookups, and a final one for one-to-many lookups. This loses the range-to-table optimization we had before, but even with the extra ranges this necessitates, the total size of the compiled binary CMap data is smaller than if we were to extend the previous scheme to 32 bits.
2014-05-10Fix 694085: Add UTF8 and UTF32 CMaps.Tor Andersson
Remove obsolete Adobe-Japan-2 based CMaps.
2014-05-08Fix curl build with thirdparty module when system curl is available too.Tor Andersson
2014-05-07Remove platform/debian directory.Tor Andersson
These files are maintained by debian. Now that debian updates the mupdf package more regularly there is no need for us to keep our own debian packaging files. https://packages.debian.org/unstable/main/mupdf
2014-05-07truncate the xref after compactingSimon Bünzli
pdf_write_document still writes the entire xref with references to all freed objects even if the xref has been compacted which makes the result of mutool clean -ggg larger than necessary.
2014-05-07minor clean-upSimon Bünzli
2014-05-07Correctly round PNG image resolutionSimon Bünzli
Currently, png_read_phys always rounds the resolution down. Many images have a resolution just slightly shy of 96 DPI and are thus rendered too large when they're resized from 95 to match the required 96 for output.
2014-05-07Bug 695112: only patch height values in JPEG streamsSimon Bünzli
If the reported height is 0 or too large, use the image size reported in the PDF itself instead (in the case of height 0, the JPEG library is supposed to read the correct value from the DNL segment, but libjpeg doesn't support that).
2014-05-07Fix 694428: use system CURL library if available.Tor Andersson
2014-05-07Fix 694510: Detect all ways to maximize a window in win32.Tor Andersson
SC_MAXIMIZE is only sent when maximizing via the maximize button. Dragging to the screen edge, double clicking the title bar or WinKey+Up do not generate an SC_MAXIMIZE message. Detect when gettincg a WM_SIZE message with SIZE_MAXIMIZE instead.
2014-05-07Fix 695112: patch JPEG streams with missing dimensionsTor Andersson
If a JPEG stream is missing valid values for width/height (usually -1), Adobe Reader substitutes these using the values read from the PDF object. This can be done by scanning and patching the data before passing it to libjpeg. Thanks to zeniko for the patch.
2014-05-07Fix 693313: increase the zoom range and use fixed steps.Tor Andersson
Use an explicit list of resolutions for +/- zoom stepping.
2014-05-07iOS: add extra icon sizes for iOS 7Paul Gardiner
2014-05-07Bug 694801: fast_cmyk_to_rgb caching broken.Robin Watts
fast_cmyk_to_rgb had a simple 1 place cache to avoid recalculating the same conversions again and again. The implementation was broken though, both in C and ARM code versions. This seems to fix it.
2014-05-06Fix 694909: revert "Force colorspaces to match with JPX images." and ...Tor Andersson
... instead convert a JPEG2000 used as a soft mask into grayscale. This is more robust than trusting the PDF specified colorspace over the internal JPX colorspace. The spec implies that in a colorspace conflict, the internal JPX colorspace should be used. The PDF colorspace may be a DeviceN or Separation colorspace. DeviceN and Separation colorspaces are not valid destination colorspaces, so we may not always be able to convert the internal JPX colorspace into the PDF specified colorspace. Converting from the internal colorspace into grayscale is more robust, and solves the issue that the original commit was intended to fix.
2014-05-05Fix 695098: don't use atoi() on non-zero-terminated buffer.Tor Andersson
2014-05-05Fix 695105: openjpeg configuration for big-endian.Tor Andersson
Stupid unportable code needs stupid unportable preprocessor macros. This only works with GCC, but should be good enough since I expect anyone using a big-endian machine to also use a GCC compatible compiler.
2014-05-05Fix 695207: printf format bug in mutool info.Tor Andersson