summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-21Handle form fields where the V is a name object.Tor Andersson
2018-08-21Improve parameter names.Tor Andersson
2018-08-21gl: Don't forget to terminate the string when clearing a text field.Tor Andersson
2018-08-21Fix 699625: Apply more vertical padding for multiline form fields.Tor Andersson
The exact value used by Adobe will need further investigation, but this gets pretty close.
2018-08-21Fix 699641: Follow Parent chain when looking up DA in annotations.Tor Andersson
The DA property is marked as inheritable for text fields. It is not marked inheritable for FreeText annotations, but I don't believe it will be a problem to treat it as such anyway.
2018-08-21Avoid unnecessary NULLing of doc->focusPaul Gardiner
doc->focus refers to a widget record within a specific page. We shouldn't NULL it when dropping a different page.
2018-08-21Choose the lastmost annotation rather than firstmost as mouse event target.Paul Gardiner
pdf_pass_event iterates through the annotations to find one with a bounding box that encompasses the event point. We were choosing the first found, whereas later annotations are considered above earlier ones so we should be choosing the last found.
2018-08-20Use "PDF Alert" as the default javascript alert title.Paul Gardiner
Without this, for alerts where no title is specified, "undefined" was displayed.
2018-08-20Fix inability to uncheck check boxes.Paul Gardiner
Just a case of fixing some incorrect logic.
2018-08-20Fix the Windows build.Paul Gardiner
Offer signing support only if we have libcrypto.
2018-08-14Fix leak of PDF object in mutool show.Sebastian Rasmussen
2018-08-14Bug 699631: Handle unsupported triangle mesh edge flags.Sebastian Rasmussen
There were two issues with the code parsing the triangle mesh's edge flags: * meshes were not require to start with an independent triangle * out of range edge flags caused vertices to be ignored A mesh where the edge flag of the first vertice is out of range, and the edge flag of the second vertex indicates continuation of a prior triangle would result in trying to create a triangle where the third coordinate would be uninitialized. This commit requires the edge flag of the first vertex to indicate a new independent triangle and if out of range edge flags are encountered they are treated as if they indicate a new triangle. Thanks to oss-fuzz for reporting.
2018-08-14Bug 698898: Always pop draw stack in case of exception.Sebastian Rasmussen
When fz_draw_clip_image_mask() calls fz_get_pixmap_from_image() may throw an exception, in this case beacuse a predicted image has an unsupported number of components (1, 2, 4, 8 and 16 are supported, but 6 is not). When this happens the recently pushed stack element is never popped, which later trips an assert() in fz_draw_end_group() at a later stage. By moving the call to fz_get_pixmap_from_image() inside fz_try the stack will be popped, thus avoiding triggering the assert(). This also requires the pixmap variable to be fz_var()ed because it changes inside the fz_try-block.
2018-08-14Bug 698887: Fix leak of device/pixmap when rendering fails.Sebastian Rasmussen
2018-08-10Check that characters aren't left over in AFSpecial_KeystrokeEx.Fred Ross-Perry
In the Javascript function AFSpecial_KeystrokeEx, if there are characters left over after exhausting the format string, it's not a match.
2018-08-10Don't trigger the keystroke event when clearing a form field.Tor Andersson
This fixes part of bug #699577. The keystroke event was preventing form fields being cleared, which is presumably not intended behaviour.
2018-08-10Update MuJS submodule to version 1.0.4.Tor Andersson
2018-08-10Treat invalid and truncated hex string characters as '0'.Tor Andersson
2018-08-10The proper term is apparently 'filename extension', not 'suffix'.Tor Andersson
2018-08-10gl: Add glutLeaveMainLoop workaround for Apple's GLUT library.Tor Andersson
2018-08-10Use proper name space for form field flag constants.Tor Andersson
2018-08-10Get and set PDF form field names as text strings.Fred Ross-Perry
2018-08-10Tweak hexdumped data to increase build portability.Tor Andersson
Follow bin2coff layout for hexdumped data instead of trying to emulate the objcopy layout (which seems to break for the android tools). Only use the basename of the resource in hexdump / bin2coff. Ifdef on HAVE_OBJCOPY instead of _WIN32.
2018-08-10Fix typo in bin2coff script.Tor Andersson
2018-08-10Remove functions that implement duplicate functionality.Tor Andersson
pdf_get_inheritable also looks in trailer/Root/AcroForm for missing keys, but this behavior is not supported by anything in the specification.
2018-08-10Fix Android java build.Tor Andersson
2018-08-10Detect cycles in pdf_dict_get_inheritable.Tor Andersson
Remove duplicate function pdf_lookup_inherited_page_item.
2018-08-10Respect NoRotate flag for icon-based annotations.Tor Andersson
2018-08-10Use stubs instead of conditional compile with HAVE_LIBCRYPTO.Tor Andersson
The macro is only set when building the pkcs7-helper library, so cannot be used by client code. Build stub functions when compiling the pkcs7-openssl helper library without libcrypto.
2018-08-10Clean up null/range/endstream filter.Tor Andersson
Use separate functions to keep the code simpler. Use memmem to simplify and optimize search for 'endstream' token. Do not look for 'endobj' since that could cause a false positives in compressed object streams that have duff lengths.
2018-08-10Add fz_memmem function taken from musl libc.Tor Andersson
2018-08-10Add digital signature UI stubs to mujstest.Tor Andersson
2018-08-10gl: Adobe allows border widths from 0 to 12.Tor Andersson
2018-08-10FIXUP pdf_update_page: use JNI_FALSETor Andersson
2018-08-10Rejig pdf_update_page and pdf_update_annot.Tor Andersson
The intent is for a user to iterate over the annotations on a page calling pdf_update_annot for each one. If this function returns true, then the annotation has changed since the last time it was called, and the user needs to re-render. pdf_update_page is a simple loop over the annotations on a page, for use if you only care about page level granularity. Users should no longer look at or change the pdf_annot.has_new_ap field.
2018-08-10Bug 699629: Avoid referencing stale/moved nodes in CMap splay tree.Sebastian Rasmussen
Thanks to oss-fuzz for reporting.
2018-08-10Bug 699628: Add fz_var to variable set in fz_try and used in fz_always.Sebastian Rasmussen
When pdf_xobject_transparency() indicates transparency, pdf_run_xobject() will push a mask with 2 components (gray + alpha). Because fz_var was missing for the transparency variable its value would, if fz_throw() was called, not be preserved in fz_always{}. This means that fz_always{} would never pop the mask from the stack. At a later stage some code would call fz_end_mask() and then trigger an assert() where the number of components was restricted to 1. Marking the variable with fz_var means that the mask will now be popped as expected. Thanks to oss-fuzz for reporting.
2018-08-10Preprocessor gluing tokens together causes clang error.Sebastian Rasmussen
2018-08-10Coverity found a missing break, add it.Sebastian Rasmussen
The intent with the previous code was to default to black upon unsupported number of components in the color array. The code however first set all components to zero then to the value of the first component of the color array. Now the code follows the original intent.
2018-08-10Bug 699627: Ignore CMap input ranges outside of input codespaces.Sebastian Rasmussen
Thanks to oss-fuzz for reporting.
2018-08-10Implement check for range overlap between cmap splay tree nodes.Sebastian Rasmussen
2018-08-10Bug 699626: Avoid trying to populate OCG ui struct without entries.Sebastian Rasmussen
Thanks to oss-fuzz for reporting.
2018-08-04Update jbig2dec.Sebastian Rasmussen
2018-08-01Update jbig2dec.Sebastian Rasmussen
2018-07-17Disallow incremental updating for documents that have hybrid xrefsPaul Gardiner
Alter pdf_can_be_saved_incrementally to return false when a hybrid xref file has been opened. This doesn't enforce the behaviour, but will ensure it for apps that determine their behaviour via this test function. Once changes have been saved to such a file, it is no longer hybrid and so further saving steps can use incremental updates. This change was made because we were previously unable to sign hybrid xref documents in a way that was satisfactory to Adobe Reader. Adobe Reader reorganises hybrid xref files, thus invalidating any signature.
2018-07-17Have pdfapp_save close and reopen the document in all casesPaul Gardiner
We need to do this, because much can change on saving, objects renumbered and moved, and we could run into inconsistencies between the file and in-memory information. This function was already reopening in the case of saving back to the same file, but in other cases.
2018-07-17Fix memory leaks in document signing functionsPaul Gardiner
2018-07-17Fix memory leak in form recalculation functionPaul Gardiner
2018-07-17Squash MSVC warnings in bin2coff.Robin Watts
2018-07-17Add MementoOpenSSL configurations.Robin Watts