summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Collapse)Author
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-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-14Move away from file descriptors to FILE *'s.Robin Watts
2015-05-07epub: Allow space between property name and ':'.Tor Andersson
2015-05-07epub: Fix typo when parsing negative numbers.Tor Andersson
2015-05-07epub: Whitespace separated by comments turn into two whitespace tokens.Tor Andersson
Deal with it.
2015-05-06WIP: Add debug printing function for generated boxes.Tor Andersson
2015-05-06epub: Add 'auto' as a special number value.Tor Andersson
2015-05-06epub: Rejig CSS parser -- whitespace is significant!Tor Andersson
The selectors ".foo.bar" and ".foo .bar" are not equivalent! They should parse as "*.foo.bar" and "*.foo *.bar" but we parsed both as "*.foo.bar" due to us ignoring significant whitespace.
2015-05-05epub: Ignore missing stylesheet files.Tor Andersson
2015-05-05epub: Bail if rights.xml or encryption.xml are present (not DRM-free EPUB).Tor Andersson
2015-05-05Ignore ENTITY declarations in XML.Tor Andersson
2015-05-05epub: Parse (and ignore) display: inline-block.Tor Andersson
2015-05-05epub: Fix signedness bug when testing character ranges.Tor Andersson
2015-05-05epub: Decode URL escapes in epub paths.Tor Andersson
2015-05-05epub: Ignore syntax errors in HTML tag style attributes.Tor Andersson
2015-05-05epub: Fix list mark horizontal placement calculation.Tor Andersson
2015-05-05epub: Parse negative decimal numbers that start with the decimal point.Tor Andersson
2015-05-05epub: Use the correct word order in border style names.Tor Andersson
2015-05-05Fix typo in fz_pack_path that caused us to malloc much more than needed.Tor Andersson
2015-05-04epub: Parse rgb(x,y,z) type colors.Tor Andersson
2015-05-04epub: Fix 695971: Don't confuse id selectors (#name) with colors in CSS.Tor Andersson
2015-05-04epub: Anchor list mark to first flow node in list item.Tor Andersson
2015-04-28epub: Only apply border widths when the border is visible.Tor Andersson
The border_style field was changed from an enum to an array of enums, but one place where it was used was not updated.
2015-04-27epub: Ugly hack so that table rows end up on their own lines at least.Tor Andersson
We don't support tables yet, so this is a stop gap measure.
2015-04-27epub: Support individual T,B,L,R border styles and colors.Tor Andersson
2015-04-27epub: Fix (incorrectly) recursively multiplied relative font sizes.Tor Andersson
2015-04-23epub: Support roman and alphabetic numbering in ordered lists.Tor Andersson
2015-04-20epub: list items with bullets and countersTor Andersson
2015-04-20epub: Also accept ".htm" file extension.Tor Andersson
2015-04-16mutool clean -z option to compress streams.Tor Andersson
2015-04-16ASCIIHexEncode inline images during sanitization if do_ascii is set.Tor Andersson
2015-04-16Fix typo in html-layout.cRobin Watts
The find_accumulated_margins function should be a void return type.
2015-04-15epub: Take margins into account when scaling images to fit the page.Tor Andersson
2015-04-15epub: Tighten the comparison for when an image is on the current page.Tor Andersson
This solves the issue with slivers of images appearing in the margin at the bottom of the previous page.
2015-04-15epub: Be resilient in the face of broken CSS.Tor Andersson
Try to recover from syntax errors in CSS rules by skipping to the end of the declaration block. Don't abort HTML parsing on CSS errors.
2015-04-15epub: Check version number and warn if it's not an EPUB 2.0 file.Tor Andersson
2015-04-14epub: Ignore CSS3 ::before pseudo-element syntax.Tor Andersson
2015-04-14Fix 695918: "mudraw -sm" format string on win32.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-14epub: Parse url() tokens.Tor Andersson
Fix bug 695922.
2015-04-09Add -v option to mutool and mudraw to print MuPDF version number.Tor Andersson
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 windows builds of epub-doc.cRobin Watts
Variables need to be defined at the top of blocks.
2015-04-07Fix whitespace.Tor Andersson
2015-04-07Add some basic page margins to EPUB layout.Tor Andersson
Add margins of 1 em at the top and bottom of every page at the top level. TODO: This should be set from the CSS using the @page selector, and be collapsed with the body margins at the start and end of each chapter, as well as the left and right body margins.
2015-04-07Fix some warnings.Tor Andersson
2015-04-07Add EPUB layout options to mupdf-x11 and mudraw.Tor Andersson
2015-04-07Trigger default layout in fz_document layer.Tor Andersson
Trigger the default layout when needed, but only if no manual layout has been done. This avoids doing a pointless double layout (once with default when loading the document, then with the manual layout call with the desired layout options).