summaryrefslogtreecommitdiff
path: root/platform
AgeCommit message (Collapse)Author
2018-04-12Fix VS project file.Robin Watts
Stray line, presumably a merge edit failure.
2018-04-12Update Android.mk for recent build changes.Tor Andersson
2018-04-11Remove needless #defines in load-jpx.cTor Andersson
2018-04-11Fix output paths in VS2005 project files.Tor Andersson
2018-04-05jni: Expose interfaces for setting gamma and inverting pixmaps.Sebastian Rasmussen
2018-04-03Android: Scavenge on Bitmap.lockPixels() failure.Robin Watts
If Bitmap.lockPixels fails with an allocation error, scavenge in the store.
2018-04-03Android: Avoid crashes if we fail to lock a Bitmap.Robin Watts
If a call to Bitmap_lockPixels() fails, then previously we would have continued on blindly and tried to use it anyway. Now, spot failures and return so we get a java exception.
2018-03-22Add fz_output encoding filters.Tor Andersson
2018-03-22Clean up windows ifdefs.Tor Andersson
_WIN32 is always defined on windows (it means the WinAPI is available). _WIN64 is also defined on 64-bit targets. This means the test for defined(_WIN32) || defined(_WIN64) is redundant, since if _WIN64 is defined, then _WIN32 is always also defined. MSC_VER is only defined for MSVC, so split the ifdef sections in include/fitz/system.h into separate MSVC and WIN32 parts so that we can build with MinGW and other non-MSVC compilers on windows.
2018-03-22Add phony target to java makefile so it properly rebuilds the native lib.Tor Andersson
Always recurse for the native library, so that it will be rebuilt if the sources change.
2018-03-22Load most annotations, even if they are missing appearances.Tor Andersson
Filter out Link and Popup annotations. Links are not comments, popup annotations are auxiliary information for other annotations, so neither of these types should be present in our list of annotations, but all other annotations should be there, whether they have appearance streams or not. Ensure has_new_ap is zero when first loaded, and changed if either the active AP object is changed or the current AP content stream is updated.
2018-03-16Add simple fonts with 8-bit greek and cyrillic encodings.Tor Andersson
Use KOI8-U for Cyrillic, and ISO 8859-7 for Greek. Use with 'mutool create' using an extra argument to the %%Font directive: %%Font TmRmC Times-Roman Cyrillic BT /TmRmC 16 Tf 10 10 Td <fa c4 d2 c1 d7 d3 d4 d7 d5 ca d4 c5 21> Tj ET The alternatives are "Latin", "Greek", and "Cyrillic".
2018-03-16Add simple CJK font creation.Tor Andersson
Create a non-embedded CJK font using UTF-16 encoding. This can be used in mutool create like so: %%CJKFont Ming GB1 BT /Ming 10 Tf 100 100 Td <4F60 597D> Tj ET
2018-03-16Fix java build.Tor Andersson
2018-03-16jni: Fix expression conflating booleans and bitfields.Sebastian Rasmussen
2018-03-12jni: Fix reference counting when creating PDF annotations.Sebastian Rasmussen
2018-03-12jni: Temporary fix to make sure annot AP field is updated.Tor Andersson
2018-03-07Fix 699081: Missing coordinate transformation when copying text.Tor Andersson
2018-02-27Remove pdf_xobject wrapper struct.Tor Andersson
Just use the pdf_obj directly. Revise ap_iteration and split annot->dirty into separate flags. One flag for needs_new_ap, and one for has_new_ap (to be used by clients who may have cached a rendered annotation).
2018-02-27Use fz_point for pdf_set_annot_ink_list and vertices too.Tor Andersson
2018-02-27Improve line ending style accessors.Tor Andersson
2018-02-27Add annotation Vertices creation functions.Tor Andersson
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.