summaryrefslogtreecommitdiff
path: root/platform
AgeCommit message (Collapse)Author
2018-02-27jni: Add the ability to supply extra C flags to Android libmupdf builds.Fred Ross-Perry
Use the MUPDF_EXTRA_CFLAGS, CPPFLAGS, LDLIBS, and LDFLAGS variables.
2018-02-27Use text encoding for pdf_choice_widget options and values.Tor Andersson
Adds a requirement on the caller to free the returned strings.
2018-02-13Add JNI and JS bindings to layer device calls.Tor Andersson
2018-02-12Clear search highlight when opening a new search, or hitting escape.Tor Andersson
2018-02-08jni: Remove unnecessary close callback in seekable stream interface.Tor Andersson
2018-02-08Update Windows build to properly handle pkcs7 reorganisationPaul Gardiner
Remove direct inclusion of pkcs7 source from the mupdf project and create a separate libpkcs7 project with others as dependants
2018-02-02Signature support: add a null pdf_check_signature functionPaul Gardiner
Add a version of pdf_check_signature function that reports no support, for builds without openssl. This allows the removal of ifdefs from the apps.
2018-02-02Signature support: fix windows build for the openssl-present casePaul Gardiner
2018-02-02Signature support: decouple mupdf from the pkcs7 implementationPaul Gardiner
The mupdf build included an implimentation of the pkcs7 functions that are needed for signing documents and verifying signatures, the implementation being either an openssl-based one, or a stub that returned errors. This commit removes the pkcs7 functions from the main mupdf library. For the sake of verification, there wasn't really a need for the pkcs7 functions to be part of mupdf. It was only the checking function that used them. The checking function is now provided as a helper, outside of the main build. The openssl-based pkcs7 functions area also supplied as a helper. Users wishing to verify signatures can either use the checking function directly, or use the source on which to base their own. Document signing requires more integration between mupdf and pkcs7 because part of the process is performed at time of signing and part when saving the document. Mupdf already had a pdf_pkcs7_signer object that kept information between the two phases. That object has now been extended to include the pkcs7 functions involved in signing, and the signing function now requires such an object, rather than a file path to a certificate. The openssl-based pkcs7 helper provides a function that, given the path to a certificate, will return a pdf_pkcs7_signer object. The intention is that different implementations can be produced for different platforms, based on cryptographic routines built into the operationg system. In each case, for the sake of document signing, the routines would be wrapped up as a pdf_pkcs7_signer object.
2018-02-02Signature support: separate pkcs7 specifics into a separate file.Paul Gardiner
Previously, pdf-pkcs7.c contained mishmash of functions required for creating and checking signatures, with no separation between the parts relating to pdf and those relating to pkcs7. This commit introduces pdf_signature.c which contains the pdf specifics, leaving pdf-pkcs7.c to be purely pkcs7 functions. This should more easily allow the use of pkcs7 solutions other than openssl. The pkcs7 api is declared in pdf-pkcs7.h. It is entirely free of mupdf specifics, other than using an fz_stream to specify the bytes to be hashed.
2018-01-31java: Don't overwrite LD_LIBRARY_PATH in 'run' target in java makefile.Tor Andersson
2018-01-31Fix 698878: Mouse wheel scrolling.Tor Andersson
2018-01-31Add buffering to fz_output.Tor Andersson
2018-01-31Update mupdf_native.h header.Tor Andersson
2018-01-27jni: Add Java interfaces to fz_stream and fz_output types.Tor Andersson
This will allow us to read and write documents using I/O written in Java, exposed by SeekableInputStream and SeekableOutputStream. We supply an example FileStream which implements seekable streams backed by a RandomAccessFile.
2018-01-19Perform signature verification via fz_streamPaul Gardiner
Previously, signature verification worked only for file-based documents and the file path had to be passed into the verification function.
2018-01-15Bug 698857: Delete local reference after use.Sebastian Rasmussen
Without deleteing it the local reference table may overflow.
2018-01-15Use C comments instead of C++ comments.Fred Ross-Perry
2018-01-04Add portable pseudo-random number generator based on the lrand48 family.Tor Andersson
2017-12-13Fix 698787: avoid using "system()" to copy files.Tor Andersson
2017-12-13gl: Tell glut to return from main loop when the window closes.Tor Andersson
This allows us to clean up memory so we can check for memory leaks. Also fix one memory leak.
2017-11-22jni/js: Add support for annotation modification dates.Sebastian Rasmussen
2017-11-22jni/js: Use correct text encoding in annotation author and contents.Fred Ross-Perry
Also clarify that a copy of author/contents is returned, and that the caller must free them.
2017-11-22jni/js: Add interfaces for creating UTF-16BE and PDF byte strings.Sebastian Rasmussen
This mirrors the existing PDFObject.asByteString().
2017-11-22jni: Remove unnecessary PDFObject.asByteName().Sebastian Rasmussen
2017-11-22jni: Make sure to dirty annotation whenever it changes.Fred Ross-Perry
2017-11-22jni: Silence warning by casting boolean to integer.Sebastian Rasmussen
2017-11-22jni: Fix bugs in StructuredText_getBlocks().Fred Ross-Perry
When iterating through blocks, make sure to include text blocks. After building the char array for a given line, be sure to add it to the line object.
2017-11-22jni: Put destination coordinates into Outline object.Fred Ross-Perry
2017-11-22jni: Free quadpoints and vertices upon JNI error.Sebastian Rasmussen
2017-11-22jni: Only keep the reference when the java constructor succeeds.Sebastian Rasmussen
2017-11-22jni: Check for exception after allocating objects.Sebastian Rasmussen
2017-11-22jni: Initialize Context before using any MuPDF classes.Sebastian Rasmussen
2017-11-22jni: Return correct quadpoints coordinates.Sebastian Rasmussen
2017-11-22jni: Return correct inklist coordinates.Sebastian Rasmussen
2017-11-22jni: Prevent memory leak by freeing upon error.Sebastian Rasmussen
Previously the counts and points arrays would leak if GetFloatArrayRegion() threw an exception.
2017-11-22jni: Clarify initialization order in Context.Sebastian Rasmussen
Previously the initialization order of init() and the field inited was not obvious. Move the static block as far up as possible but make sure that inited is initialized before that. Also add a comment explaining why.
2017-11-22Prefer using fz_snprintf over snprintf.Sebastian Rasmussen
This way the MuPDF library itself only uses fz_snprintf for consistent formatting.
2017-11-17Purge remnants of GLFW.Tor Andersson
2017-11-13gl: Fix GLUT build on MacOS X.Tor Andersson
2017-11-13gl: Make KEY_DELETE match actual ASCII DEL code.Tor Andersson
2017-11-13gl: Fix busy loop.Tor Andersson
glutMainLoopEvent does not sleep for events, so use glutMainLoop instead and destroy the window when 'q' is pressed rather than just setting the quit flag.
2017-11-10Purge obsolete NDK_PROFILER code.Tor Andersson
2017-11-10jni: Update for StructuredText highlight and copy changes.Tor Andersson
2017-11-09Fix windows build of GL app.Robin Watts
2017-11-09VS2005: Fix Freeglut build.Robin Watts
2017-11-08Be a bit paranoid.Tor Andersson
We currently don't handle errors here, but if we do in the future we don't want stale pointers lying around.
2017-11-08Select and copy structured text by lines.Tor Andersson
2017-11-08gl: Remove GLFW and reinstate FreeGLUT.Tor Andersson
GLFW doesn't build on Visual Studio 2005 anymore, and I don't have time to keep up with the changes. So, we're switching back to FreeGLUT, which is more stable. I've added the two missing features that made us switch to GLFW in the first place: input methods and system clipboard support. If MuPDF is compiled with our version of FreeGLUT, we now use these functions: * glutKeyboardExtFunc * glutSetClipboard * glutGetClipboard
2017-11-08Bug 698616: Fix use after free in Page_textAsHtmlRobin Watts