summaryrefslogtreecommitdiff
path: root/platform
AgeCommit message (Collapse)Author
2015-08-21GProof: Return Android style RGB color values from the JNI.Robin Watts
Android wants colors to be BGRA, not RGBA, so accomodate this.
2015-08-21GProof: Fix Android JNI functions for multipage files.Robin Watts
Explicitly pass the page number into separation related functions.
2015-08-20Remove duplicate inclusions of headers.Sebastian Rasmussen
These headers are already included by mupdf/fitz/system.h.
2015-08-17Revert "win32: Convert argv to utf-8 and use regular getopt."Robin Watts
Neatness doesn't override actually working. This reverts commit efb5a38ca0bac3537ceaf3383681a518df133143.
2015-08-17Add JNI interface to MuPDFCore to read/write separations on a page.Robin Watts
Get separation information out to the Java level.
2015-07-31win32: Convert argv to utf-8 and use regular getopt.Tor Andersson
Easier than duplicating getopt for wchar_t, since we already have windows specific functions to convert wchar_t strings.
2015-07-30Add load-gif.c to visual studio projectMichael Vrhel
Windows build was broken with commit 642a59a4de683a1359733229943be285e3e45c4f
2015-07-20Improved Android debugging support.Robin Watts
If we build with DEBUG set, the native section will be built with debugging enabled. The debuggable flag in AndroidManifest still needs to be edited manually, but it's set explicitly false here so we can grep for it. Also, send stdout/stderr to text files in DEBUG builds. The path for this may not work on all phones (it certainly works on the LG G3, running Lollipop), but it won't hurt on anything.
2015-07-20Tweak Android MuPDF build to respect SUPPORT_GPROOF.Robin Watts
MuPDFCore now supports a gprfSupported method that returns true iff we compiled the core with SUPPORT_GPROOF and a libgs.so is available.
2015-07-20Add Proofing button to Android UI.Robin Watts
Hit the proofing button, and we create a new temporary .gproof file. We invoke a new version of MuPDF on that. When that finishes control returns to us, and we delete the .gproof file. Currently the new version of MuPDF loads the .gproof file, but fails to generate any pages from it, as we have no version of ghostscript on the system. Generating this new ghostscript is the next job.
2015-07-20Code to generate a GProof file from a currently opened document.Robin Watts
Given a document, generate a gproof file from it. This encapsulates the name of the file, the desired resolution for proofing, and the page dimensions of all the pages in the file. The idea is that an app will call this when it is asked to go into 'proofing' mode, and will reinvoke itself on this file. This gives the gprf document handler just enough information to fake up a document of n pages of the required sizes. Each page will then be autogenerated on demand.
2015-07-20First cut at gprf document handler.Robin Watts
Doesn't actually trigger generation from ghostscript, or load images from files generated by ghostscript yet.
2015-06-29Add Separation class to fitz.Robin Watts
Simple set of functions for managing sets of separations. Separations have names, equivalent rgb/cmyk colors, and can be enabled/disabled.
2015-06-29Add an fz_tempfile utility.Robin Watts
This will be required for the gprf work.
2015-06-26Bug 696053: Update windows mupdf to respect command line flags.Robin Watts
Previously, only the unix executable had been updated to take command line flags; update the windows one in line with it. We have to cope with the argv being in Unicode; add a windows specific version of getoptw for this. Also note that that fprintf's in the windows mupdf exe won't work as GUI apps don't have a console window, and can't write to the parent one. Fixing that is a larger project than I have time for right now.
2015-06-03Fix Windows 8.1 operation on hi-dpi displays.Robin Watts
MuPDF only. Call SetProcessDPIAware if it's available; this stops Windows doing its own horrible scaling causing blurriness. Also, interrogate the screen display to get the real dpi and use that as our basis.
2015-06-03Enable FZ_LARGEFILE for all windows builds.Robin Watts
People worrying about the minimal extra memory this takes can disable it if required.
2015-06-02Ensure that we can still build mudraw standalone if we want to.Robin Watts
MUDRAW_STANDALONE forces mudraw_main to be just main. Set this in the mudraw VS project.
2015-05-25Update VS solution with mutool changes.Robin Watts
mudraw.c must be included into mutool.
2015-05-25Add key binding '[' and ']' to change font size on x11/win32 viewers.Tor Andersson
Only affects EPUB and HTML.
2015-05-19epub: User stylesheets.Tor Andersson
Add -U option to mupdf and mudraw to set a user stylesheet. Uses a context to store user the stylesheet, just like the AA level.
2015-05-15Support pdf files larger than 2Gig.Robin Watts
If FZ_LARGEFILE is defined when building, MuPDF uses 64bit offsets for files; this allows us to open streams larger than 2Gig. The downsides to this are that: * The xref entries are larger. * All PDF ints are held as 64bit things rather than 32bit things (to cope with /Prev entries, hint stream offsets etc). * All file positions are stored as 64bits rather than 32. The implementation works by detecting FZ_LARGEFILE. Some #ifdeffery in fitz/system.h sets fz_off_t to either int or int64_t as appropriate, and sets defines for fz_fopen, fz_fseek, fz_ftell etc as required. These call the fseeko64 etc functions on linux (and so define _LARGEFILE64_SOURCE) and the explicit 64bit functions on windows.
2015-05-07Update version number to 1.7a for the bugfix release.Tor Andersson
2015-05-07Add some missing headers to MSVC solution.Robin Watts
2015-04-28Add EPUB to windows viewer file assocations.Tor Andersson
2015-04-15ios: add epub to the list of handled file formatsTor Andersson
2015-04-15Fix crash in iOS app when share button is usedPaul Gardiner
popover presentations need to be told which button to emerge from
2015-04-14android: Add EPUB support to file chooser. Fix crash on non-pdf documents.Tor Andersson
2015-04-14Split fz_meta into separate querying functions.Tor Andersson
Add fz_has_permission function to fz_document. Add fz_lookup_metadata function to fz_document. Remove fz_meta function from fz_document.
2015-04-09Remove the _no_run functions.Tor Andersson
The new pdfclean sanitize functionality mean that mutool now needs the data files, so maintaining the split that was designed to keep data files out of mutool is no longer viable.
2015-04-08Fix mupdf viewer on windows; mousewheel events would stop keys respondingRobin Watts
Mousewheel events would 'capture' the mouse, and consequently all keyboard events would be ignored until the next mouse button up. Simple fix.
2015-04-07Fix whitespace.Tor Andersson
2015-04-07Tweak CHANGES and README for release 1.7.Robin Watts
Update FZ_VERSION to 1.7 Update Android app version.
2015-04-07Add EPUB layout options to mupdf-x11 and mudraw.Tor Andersson
2015-04-06Bug 693688: MuPDF viewer; if reload fails, don't crash out.Robin Watts
Use a placeholder document instead - just a big red 'X'. Supposedly lots of people use MuPDF to view the output of their TeX documents. Sometimes the compilation of the TeX document fails, and reload results in MuPDF closing. This should allow their window to stay open until they fix the problem and reload again.
2015-04-06Remove gsview from mupdf repo.Robin Watts
It has its own repo now. See http://git.ghostscript.com/?p=gsview.git
2015-04-06Add mutool pages subcommand.Robin Watts
Inspired by bug 695823. Mutool can now dump the sizes and orientations for pages within a given file.
2015-04-06Move the guts of pdfclean into the lib.Robin Watts
Michael needs to be able to call pdfclean from gsview. At the moment he's having to do this by including the pdfclean.c file into the lib build, and then calling pdfclean_main with a faked up command line. This isn't nice. pdfclean.c is implemented by pdfclean_main parsing the options/filenames out of argv and then passing the filenames/options on to a pdfclean_clean function. This seems like a much nicer API to offer to the world. We therefore pull the guts of pdfclean.c (pdfclean_clean and its subsidiary structures/functions) into pdf-clean-file.c and include this in the library build. This leaves pdfclean.c just as the command line parsing. This should not affect the size of any of the resulting binaries.
2015-04-03Bug 693481: Android: Allow panning while zoomingRobin Watts
Adopt (slightly modified) version of Kenny Lam's patch to allow panning while zooming. This more closely matches how a web view behaves.
2015-04-03Bug 694388: Android: Don't call requestLayout more than we need to.Robin Watts
Thanks to Goncalo Ferreira for spotting this.
2015-03-31Bug 695457: Improve mouse wheel handling in viewer.Robin Watts
On windows, handle mouse wheel events as mouse events rather than keyboard ones. This means that Ctrl-wheel zooms as expected (consistent with Chrome etc). Also ensure that Shift-wheel changes from vertical to horizontal. Mouse wheel over pages that are larger than fit in the window now scroll around the page. Once they hit the edge of the window, the page flips to the next/previous page as you would expect.
2015-03-30Bug 695804: Add support for 'Shift-Space' in the viewer.Robin Watts
Update pdfapp_onkey to take modifiers. If shift is held down when space is sent, then back up a page. This involves updating the windows app to actually send modifiers. Previously they were always sent as zero to the onmouse routine.
2015-03-30Add header for waitpid().Tor Andersson
2015-03-30Bug 695829: Mouse buttons flip pages in presentation mode.Robin Watts
Adopt patch from Risto Saarelma. When in presentation mode, left and right mouse buttons flip pages forward/back.
2015-03-30Bug 695558: Fix UTF-8 window titles on X11.Robin Watts
Adopt Guillume Duranceau's patch to set the NET_WM_NAME property for window titles.
2015-03-26Android: Tweak MuPDFReaderView enum definition.Robin Watts
Given that MuPDFReaderView has a public setMode call, ensure that the enum with the Mode values in is public too. Thanks to Jeremy Dixon for pointing out the issue.
2015-03-26Bug 695701: Tweak forking of PDF links to avoid zombie processes.Robin Watts
Adopt a small patch from ooesili@gmail.com to avoid zombie processes that are left around after processes opened from PDF links are terminated.
2015-03-26Bug 695811: Adopt Freds patch for Android crashes with strange filenames.Robin Watts
I can't claim to entirely understand why one formulation works and the other doesn't, but it seems a harmless enough fix that apparently works.
2015-03-25Update Android code to use new PDF_NAME formulation.Robin Watts
2015-03-24Rework handling of PDF names for speed and memory.Robin Watts
Currently, every PDF name is allocated in a pdf_obj structure, and comparisons are done using strcmp. Given that we can predict most of the PDF names we'll use in a given file, this seems wasteful. The pdf_obj type is opaque outside the pdf-object.c file, so we can abuse it slightly without anyone outside knowing. We collect a sorted list of names used in PDF (resources/pdf/names.txt), and we add a utility (namedump) that preprocesses this into 2 header files. The first (include/mupdf/pdf/pdf-names-table.h, included as part of include/mupdf/pdf/object.h), defines a set of "PDF_NAME_xxxx" entries. These are pdf_obj *'s that callers can use to mean "A PDF object that means literal name 'xxxx'" The second (source/pdf/pdf-name-impl.h) is a C array of names. We therefore update the code so that rather than passing "xxxx" to functions (such as pdf_dict_gets(...)) we now pass PDF_NAME_xxxx (to pdf_dict_get(...)). This is a fairly natural (if widespread) change. The pdf_dict_getp (and sibling) functions that take a path (e.g. "foo/bar/baz") are therefore supplemented with equivalents that take a list (pdf_dict_getl(... , PDF_NAME_foo, PDF_NAME_bar, PDF_NAME_baz, NULL)). The actual implementation of this relies on the fact that small pointer values are never valid values. For a given pdf_obj *p, if NULL < (intptr_t)p < PDF_NAME__LIMIT then p is a literal entry in the name table. This enables us to do fast pointer compares and to skip expensive strcmps. Also, bring "null", "true" and "false" into the same style as PDF names. Rather than using full pdf_obj structures for null/true/false, use special pointer values just above the PDF_NAME_ table. This saves memory and makes comparisons easier.