summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Collapse)Author
2015-10-29Fix 696303: Off-by-one error when checking for exception stack overflow.Tor Andersson
2015-10-21Fix signatures for files created with pdf_create_document.Simon Reinhardt
See Bug 696284. Do not set disallow_new_increments in pdf_create_document, as this breaks following calls to pdf_sign_signature. See also the comments in bug 696251.
2015-10-19Fix 695582: add knockout group for text that is both stroke and fill.Tor Andersson
2015-10-15Fix 696241: fix bracketing of begin_group/end_group for text objects.Tor Andersson
2015-10-14Remove unused variable.Michael Vrhel
2015-10-14Add proper support for when a combobox widget has options that are 2-element ↵Michael Vrhel
arrays The list box and combo box can have values that are 2-element arrays. The first element is the "export" value and the second element is the value that should be shown in the list box UI. This fix ensures that we get the proper value to show in the UI. Also, it adds the option to get the export values. These are needed if you wish to update the field dictionary's V (value) entry, which is the currently selected values(s). This fix works well with gsview. The other viewers will now display the proper content in their UI, (unlike before this fix) but may need a bit more work to ensure that the proper V (value) is updated with changes in the selections. In addition, we add selection rectangles to the selected list box items.
2015-10-14Scale colors of JPEG2000 images with bit depths less than eight.Tor Andersson
2015-10-14Fix incremental xref stream.Simon Reinhardt
When writing incremental xref streams, the opts->use_list entry of the last object, i.e. of the xref stream object itself, was left uninitialized. This resulted in a random value, 0 or 1, being written into the xref stream. Also, always write a newline before the endstream keyword, as that shall be done for xref streams and should be done for all other streams.
2015-10-14Fix pdf_create_document.Simon Reinhardt
In pdf_create_document set disallow_new_increments to 1. Without this, the calls to pdf_new_ref in pdf_create_document create an incremental xref section. The following call to pdf_set_populating_xref_trailer then does not set the trailer of the final xref section.
2015-10-14pdf: Handle surrogate pairs in pdf_to_utf8.Tor Andersson
2015-10-14pdf: Flush text if content stream processing is cut short by errors.Tor Andersson
2015-10-06epub: Implement style 'visibility' attribute.Tor Andersson
2015-10-06xps: Add separate link parsing step.Tor Andersson
Don't rely on having to run the page once with an identity transform before being able to load the links.
2015-10-06xps: Make guts of path and text parsing publically visible.Tor Andersson
For use in a later link parsing refactoring commit.
2015-10-06xps: Simplify transform attribute/tag parsing.Tor Andersson
2015-10-06Never squish a substitute font to zero width, in case of broken font metrics.Tor Andersson
2015-10-05Use FT_Get_Advance in glyph width scaling calculations.Tor Andersson
2015-10-02Don't stretch CJK substitute fonts.Tor Andersson
2015-10-02Fix 696148: Always create a glyph width table.Tor Andersson
Respect default widths when creating the glyph width table.
2015-10-02Bug 696131: Detect some overflow conditionsRobin Watts
When lexing a number, do NOT check for overflow. This causes loss of data in some files. The current implementation matches Acrobat. When lexing a startxref offset, check for overflow. If found, throw an error.
2015-10-02Bug 696078: Improve box handling in poster tool.Robin Watts
The poster tool worked by rewriting the mediabox, but left the other boxes (crop, bleed, trim, art) unchanged. This could cause problems with viewers that didn't intersect such boxes. This update makes the poster tool write intersected boxes for all boxes.
2015-10-02Bug 696129: Be more forgiving of broken files.Robin Watts
The PDF spec says that old format xrefs should start with: xref\n<start> <len> The example file in question has: xref <start> <len> which confuses our parsing code. Update the parse code to avoid using fz_read_line, and to instead work on a char level. Also, downgrade the error given when the first object is not free to be a warning. Now we do 'just in time' repair, we are probably better able to cope.
2015-10-02epub: Parse NCX table of contents.Tor Andersson
2015-10-02Reference count fz_outline struct.Robin Watts
2015-10-02fz_link fixes.Robin Watts
Make fz_link reference counting threadsafe. Remember to free dests of GOTO links. Accordingly, ensure that XPS does not create links with uninitialised dests.
2015-10-02epub: Use CJK line breaking rules.Tor Andersson
A far cry from the full Unicode Line Breaking Algorithm, but it solves the main issues with CJK line breaking.
2015-10-02epub: Parse enough metadata to find title and author.Tor Andersson
2015-10-01Bug 696146: Improve pdf_repair to find /Root in new style XRefs.Robin Watts
The current code never looks for /Root objects in dictionaries as it parses them. This means that 'New style' files end up without any Roots after repair. The new code therefore updates pdf_repair_obj to look for Root objects in the same way it looks for encrypt and id objects. These go into the list of found roots. The Root object almost certainly has indirections within it, so it is vital that the 'doc' pointer gets set. This means we have to make a slight adjustment to pdf_repair_obj so that the dict is parsed with a doc pointer. In turn this means we need to manually ensure that none of the other information read from the dict during the repair operation will cause indirections to be resolved. This is achieved by checking for !pdf_is_indirect at various points.
2015-09-30Ensure that dots are non-zero sized.Robin Watts
In fz_add_line_dot, if the flatness is too low, we can end up with dots being 1 dimensional. Ensure that we always use at least 3 vertexes to approximate a dot. This was inspired by (but does not fix) bug 696172.
2015-09-30Bug 696115: Further fix for setjmp/longjmp.Robin Watts
Tor turned up an interesting section in the C spec about this. See page 275 of http://open-std.org/jtc1/sc22/wg14/www/docs/n1494.pdf regarding acceptable places for setjmp to occur. It seems that: if (setjmp(buf)) if (!setjmp(buf)) if (setjmp(buf) {==,!=,<,>} <integer constant>) etc are all valid things to do, but assignments (and subsequent testing of values) like: if ((code = setjmp(buf)) == 0) are not allowed. Further, it's not even clear that: if (a() && setjmp(buf)) is permissible. We therefore recast the macros into the form: a(); if (setjmp((buf)) == 0) which should be acceptable under the C spec. To keep try atomic, we introduce a block '{{{' around this, along with a matching close block '}}}' in the catch clause. This has the nifty extra effect of giving us a compile time error if we mismatch our try/catches.
2015-09-30Fix windows build of fitz/util.cRobin Watts
Use +/-FLT_MAX rather than INT_MIN/MAX for floats. Avoid mid-block definitions of vars.
2015-09-29add fz_separation_disabled_on_page() and related functionsfredrossperry
2015-09-29gproof: put the generated page file in the same directory as the gproof filefredrossperry
2015-09-29Support for proofingfredrossperry
- use core.fileFormat to decide whether a proof file is being viewed, - don't show the proofing button except for PDF files. - in a proofing activity, show the page that was being viewed when the proof was requested. - Add extra two arguments to fz_write_gproof_file in the Android build.
2015-09-28Fix mudraw text outputting to respect given filename.Robin Watts
When we are asked to output a text file, the current code would correctly guess the file format from the name, but would then output to stdout anyway. Fixed here.
2015-09-28Bug 696170: Fix typo.Robin Watts
sizeof(16) is not 16 :) Thanks to David Binderman for pointing this out.
2015-09-28Fix -p option to mutool draw.Robin Watts
We were missing a : in the getopt string after the 'p' meaning that any password supplied was treated as a filename.
2015-09-28Bug 696182: Fix Revision 6 PDF encryption.Robin Watts
Take on 2 patches from Zeniko to solve problems with the latest version of PDF encryption. Many thanks.
2015-09-25Abort repairing if we cannot find any objects.Tor Andersson
2015-09-24epub: Add metadata function.Tor Andersson
Still a no-op except for returning the document format.
2015-09-15epub: Use a fallback font.Tor Andersson
2015-09-15epub: Remove useless lock/unlock calls when setting user CSS.Tor Andersson
2015-09-15epub: Fix typo in roman numeral formatting.Tor Andersson
2015-09-14Add utility functions to help reduce device creation boilerplate.Tor Andersson
2015-09-14Remove unused functions.Tor Andersson
2015-09-14Fix truncation bug when comparing EOF to uint16_t values.Tor Andersson
2015-09-02Fix broken build due to mudraw not being updated for changes to gproof creationMichael Vrhel
2015-09-02Add in support for icc profiles in gprf/gproof formatMichael Vrhel
The default profile case (sRGB and SWOP CMYK) are indicated by empty strings for those entries.
2015-09-01Default to invert_cmyk_jpeg for all formats other than PDF.Tor Andersson
2015-09-01Update UCDN database.Tor Andersson