summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-20Add .gproof output mode to mudraw.Robin Watts
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-07-20Tweak fz_tempfile to include directory hint.Robin Watts
In android, we can't write to '.', and we don't have TMP defined. Therefore use the path of the supplied file as a hint.
2015-07-20Fix leak during text extraction.Robin Watts
MuPDF (the win32/linux viewer) leaks a span_soup each time it is run, even if (seemingly to the user) no text extraction operations are done. This is because the view does a text extraction pass silently, during which 'begin_page' is called for both page contents and annotation contents. This causes a leak of a span_soup. Change the implementation to allocate the span_soup just in time instead.
2015-07-20Bug 696061: Fix leak of xml block.Robin Watts
Bug 696061 showed GhostXPS crashing with a SEGV. Checking MuPDF showed that a fix had already been applied here, but Memento shows that the fix was causing a leak. We therefore patch the leak here.
2015-07-20Enable fz_images to have NULL buffers, and still be decoded.Robin Watts
Important for gproof files.
2015-07-20Fix leak in separations code.Robin Watts
Include code to free the list of separation names.
2015-07-10Add some more comments to the fz_separations class.Robin Watts
Hopefully this clarifies the intent.
2015-06-29Add separations functions to the fz_page interface.Robin Watts
This way an app can query the separations on a page, turn them on/off etc.
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-29Further tweaks to fz_image handling.Robin Watts
Ensure that subsampling and caching happen in the generic image code, not in the specific. Previously, the subsampling happened only for images that were decoded from streams. Images that were loaded direct were never subsampled and hence were always cached at full size. After this change both classes of image are correctly subsampled, and the subsampled version kept in the cache. This produces various image diffs in the cluster, none of which are noticable to the naked eye.
2015-06-29Rejig the internals of fz_image slightly.Robin Watts
Previously, we had people calling image->get_pixmap directly. Now we have them all call fz_image_get_pixmap, which will look for a cached version in the store, and only call get_pixmap if required. Previously fz_image_get_pixmap used to look for the cached version in the store, and decode if not - hence the decoding code is now extracted out into standard_image_get_pixmap. This was the original intent of the code, it just somehow didn't end up like that. This nicely queues us up for being able to have fz_images that use a different get_pixel implementation, such as that which will be required for the gprf code.
2015-06-29Add an fz_tempfile utility.Robin Watts
This will be required for the gprf work.
2015-06-26Add stream functions for reading LE values of different sizesRobin Watts
fz_read_int16le, fz_read_int32le, fz_read_int64le.
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-11Update make instructions in examples to allow for crypto lib.Robin Watts
If libcrypto is installed then the Make system will cause HAVE_OPENSSL to be defined during the build. This pulls in dependencies on libcrypto, so this needs to be included in the link.
2015-06-05Fix mutool clean for FZ_LARGEFILE case.Robin Watts
We were allocating the ofs array as ints and then filling it with fz_off_t's.
2015-06-05Fix leak of doc->xref_index in mutool clean.Robin Watts
When replacing the xref_index, lose the old one.
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-02Fix FZ_LARGEFILE operation for large files with old style xrefs.Robin Watts
I'd missed converting some int's to fz_off_t's.
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-26epub: Skip initial whitespace flow nodes when finding list anchors.Tor Andersson
They are skipped during layout, so should also be skipped here. Fixes bug 695943.
2015-05-25Update VS solution with mutool changes.Robin Watts
mudraw.c must be included into mutool.
2015-05-25Merge 'mudraw' into 'mutool' binary.Tor Andersson
Use "mutool draw" or symlink mutool to mudraw to use mudraw.
2015-05-25Add key binding '[' and ']' to change font size on x11/win32 viewers.Tor Andersson
Only affects EPUB and HTML.
2015-05-25Style context reference should be 1 after creationSebastian Rasmussen
2015-05-25Bug 695949: Fix bug in pdf_dict_del.Robin Watts
Fir typo in pdf_dict_del. Issue and fix both provided by Willus (William Menninger).
2015-05-19Add locks to fz_set_device_xxx colorspace context functions.Tor Andersson
2015-05-19epub: Parse CSS combinators left-associatively.Tor Andersson
Fixes bug 695994 where multiple child selectors would not match properly. The "a > b > c" rule should be interpreted as ((a > b) > c) in order to match properly.
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-19epub: Use per chapter page margins.Tor Andersson
2015-05-19epub: Support !important property declarations.Tor Andersson
2015-05-18epub: Improve default stylesheet.Tor Andersson
2015-05-15epub: Use flag bits for white-space enum.Tor Andersson
2015-05-15epub: Don't inherit font-size textually, despite what the spec says.Tor Andersson
Ignore inheritance on font-size properties altogether. Since we already inherit the font-size during the 'em' calculations when laying out text, inheriting the font-size property textually will result in doubling the effect of any scaling.
2015-05-15epub: Apply @page selector margins.Tor Andersson
2015-05-15epub: Parse (and ignore) @page selector.Tor Andersson
2015-05-15epub: Move collapsed parent/child top margins to outside the parent.Tor Andersson
2015-05-15epub: Improve margin collapsing.Tor Andersson
2015-05-15epub: Handle white-space property.Tor Andersson
Add 'break' nodes to flow list for forced line breaks.
2015-05-15pdf_dict_find optimisation.Robin Watts
When doing pdf_dict_put, we first call pdf_dict_find to hunt for an existing entry we can just update. Recently we introduced a 'location' return from pdf_dict_find that would (in the non-found case) return the location of where such an entry should be inserted. It's just dawned on me that we don't need a separate variable for this. We continue to return negative numbers for 'not found', but these negative numbers can contain the insertion point.
2015-05-15Fix bug in pdf_dict_find.Robin Watts
Sebras and Tor spotted that we could get occasional 'warning: cannot seek backwards' messages. An example command that shows this is: mutool show pdf_reference17.pdf grep They further tracked the problem down to the 'sorted' side of the pdf_dict_find function. In the binary search, I calculate c to be the comparison value between pairs of keys. In the case where both keys (names) are in the special case 'known' range below PDF_OBJ__LIMIT, I use pointer arithmetic for this. Unfortunately, I was forgetting that the compiler thinks that pdf_obj *'s are 4 (or 8) bytes in size, so was doing (a-b)/4. To workaround this I cast both keys to char *'s. This solves the bug. Thanks to Sebras and Tor for doing the hard work in tracking this down.
2015-05-15Memento improvements.Robin Watts
Firstly, when displaying a list of nested blocks, don't suppress outputting a block just because it contains a pointer to itself. Various valgrind fixes from the gs version of memento. Experimental C++ operators. See writeup in memento.h comments for how to integrate.
2015-05-15Add Makefile flag for building large file variants.Robin Watts
Use: "make largefile=yes" to force largefile support on. At the moment it defaults to off.
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-14Remove stray duplicate #defineRobin Watts
2015-05-14Move away from file descriptors to FILE *'s.Robin Watts
2015-05-07Update CHANGES.Tor Andersson