summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2014-05-02Fix 692171: Guard against .incbin on Intel's C compiler.Tor Andersson
2014-05-02Print error when trying to open document without any pagesSebastian Rasmussen
2014-05-02Fix warning in debug message for CURL in X11 viewerSebastian Rasmussen
2014-05-02Raise CURL transfer size from 4KByte to 1MByte in X11 viewerSebastian Rasmussen
Previously, the overhead for the HTTP requests and responses was too high, e.g. pdfref17.pdf would result in almost 8000 separate HTTP requests (but with this patch about 30.
2014-05-02Initialize timeout earlier in x11 viewerSebastian Rasmussen
Previously any warning displayed at the top of the page would never disappear because the display timeout being set would be overwritten by the later initialization.
2014-05-02Update pkgconfig file for the debian librarySebastian Rasmussen
2014-05-01Fix 694084: compute number of segments in radial shading from radius.Tor Andersson
2014-04-27Bug 695171: Pointer error when padding an fz_concat machineRobin Watts
When we return the padding byte in an fz_concat stream, ensure that we remember to increment rp to point just past in. If not, then we'll read 2 whitespace chars out. This is fine unless we try and fz_unread_byte the first one, when we'll leave rp pointing to an out of buffer address. Credit to Malc for the bisecting/debugging that got me to the fix. Many thanks.
2014-04-24iOS: remove the annotations button for non-interactive document typesPaul Gardiner
2014-04-24iOS: perform rendering for AirPrint in stripsPaul Gardiner
2014-04-24iOS: fix AirPrint quality to 300 dpiPaul Gardiner
2014-04-24iOS: refactor AirPrint code ready for printing at higher res and in stripsPaul Gardiner
2014-04-24iOS: copy files from Inbox to Documents so that they can be alteredPaul Gardiner
2014-04-24iOS: add support for sharing documents with other appsPaul Gardiner
2014-04-23Fix 693419: always load CIDToGIDMap if it exists.Tor Andersson
OpenType CFF fonts are detected as TYPE1 by ft_kind. Relaxing the test for when to load a CIDToGIDMap lets us load it even for OpenType fonts.
2014-04-23Fix 693391: simplify warning messageTor Andersson
Don't print the code point number, to let the inhibition of multiple identical warnings kick in.
2014-04-23Fix 693518: update Makerules and debian/controlTor Andersson
Debian doesn't have libopenjp2 as a package (whereas gentoo does) so I've removed it from the control file. You'll need to use the thirdparty submodule for openjpeg2 until such a time as it exists.
2014-04-23Fix 692986: add OpenBSD to list of systems that may have .incbinTor Andersson
2014-04-23Fix 692866: improved handling of newlines when copying text.Tor Andersson
Only add newlines between selected lines of text.
2014-04-23Fix bug 693580 by skipping xml tag namespace prefixes.Tor Andersson
fts_5904.xps and fts_5905.xps use namespace prefixes. Work around that by ignoring the namespace prefix for tag names. A more robust solution would be to expand or record the tag and attribute namespaces in the fz_xml node structure, but that's a overkill for our current needs.
2014-04-22Handle errors from curl by eventually throwingSebastian Rasmussen
Previously errors from curl_easy_perform() were never checked. This caused mupdf to enter an eternal loop, repeatedly trying to get data to parse from the remote host.
2014-04-22Error out on unsupported encrypted zip filesSebastian Rasmussen
2014-04-22Take on curl change from Sebastian.Robin Watts
This should get us better errors out.
2014-04-22Tweak Intent usage for ChoosePDFActivityRobin Watts
ChoosePDFActivity can be used either to select PDF/XPS etc files, or to select key files (for digital signatures). The choice of which one to use is made according to the action string in the Intent with which the activity is invoked. Previously we would look for Intent.action.MAIN and take this to mean "Look for PDF files", and anything else to mean look for key files. Unfortunately, if you start the activity directly using adb then the action string is null, so we look for key files. The fix is to use a specific (custom) string for key files and for everything else to be treated as a request for PDF files.