summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-24Remove need for namedump by using macros and preprocessor.Tor Andersson
Add a PDF_NAME(Foo) macro that evaluates to a pdf_obj for /Foo. Use the C preprocessor to create the enum values and string table from one include file instead of using a separate code generator tool.
2018-04-23Avoid SEGV when mudrawing to SVG.Robin Watts
Belt and braces: 1) Don't attempt to close a NULL output stream. 2) If an output stream is NULL when we do close it, don't SEGV.
2018-04-20Limit xref parser to read entry contents.Sebastian Rasmussen
Previously if an xref entry looked like: 0000000000 65535 f 1 0 n 2 the xref entry parsing would try to access the scratch buffer outside of the part populated by the read leading to possibly using uninitalized data.
2018-04-20Add isdigit convenience macro in xref parsing.Sebastian Rasmussen
2018-04-19Support CalRGB (and CalGray) as destination color spacesMichael Vrhel
I did not foresee the case where a transparency groups color space could be a Cal color space. I had always thought of them as only be source color spaces not destination color spaces. This commit makes sure that we have the equivalent ICC profile when the destination is a Cal space.
2018-04-12Fix VS project file.Robin Watts
Stray line, presumably a merge edit failure.
2018-04-12Update CHANGES and bump version.Tor Andersson
2018-04-12Update Android.mk for recent build changes.Tor Andersson
2018-04-11Remove needless #defines in load-jpx.cTor Andersson
2018-04-11Update jbig2dec submodule.Tor Andersson
2018-04-11Update MuJS submodule to version 1.0.3.Tor Andersson
2018-04-11Fix CMap parsing bug when handling unicode surrogate pair ranges.Tor Andersson
Increment the value after adding the mapping, not before.
2018-04-11Rework how we handle DynaLab tricky fonts in freetype.Tor Andersson
Force the face_flags to include TRICKY if we detect a DynaLab font name instead of trying to force hinting ourselves.
2018-04-11Fix output paths in VS2005 project files.Tor Andersson
2018-04-11Update examples.Tor Andersson
2018-04-11For mutool create the encoding is not actually required.Sebastian Rasmussen
Also update the comment in the code to mention the optional encoding argument.
2018-04-08Set pointers to NULL so they can be safely dropped.Sebastian Rasmussen
Previously these were not set to NULL, which caused spurious segmentation errors.
2018-04-06Fix store multi-threading problem.Robin Watts
While running 'ensure_space', we can drop and retake the alloc lock. This can enable other threads to perform store operations, which can trigger reaps. When reaps happen, fz_item's are discarded. This is particularly bad when ensure_space happens to be holding onto a pointer to one (prev). The fix, implemented here, is to move items out of the store list (and hash table), and put them onto a local 'to_be_freed' list. Once on this local list we can be sure that they won't be found by other threads doing store operations, and they can be safely freed from there (dropping/retaking the lock as required).
2018-04-05jni: Expose interfaces for setting gamma and inverting pixmaps.Sebastian Rasmussen
2018-04-04Fix silly typo in pdf_load_compressed_inline_image.Tor Andersson
2018-04-03epub: Cope with empty (zero units tall) chapters.Tor Andersson
2018-04-03Set CXX to C++ compiler when cross compiling.Tor Andersson
2018-04-03Don't implicitly drop in fz_open_* chained filters.Tor Andersson
2018-04-03Fix error message in tar archive code.Tor Andersson
2018-04-03Fix error cleanup in pdf_load_font.Tor Andersson
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-04-03Fix VS2008 build.Robin Watts
Ken reports that a VS2008 import of the projects fails with complaints about __restrict whereever stdlib.h is included. Fix the #ifdeffery so that we don't mess with it on VS2008.
2018-03-22Fix bug 696910 in a different way.Tor Andersson
The strdup function is not part of the strict C++ standard. Use gnu++0x instead of c++0x when building Harfbuzz, which uses this function.
2018-03-22Use PDF object creation convenience functions.Tor Andersson
Use pdf_dict_put_* convenience functions. Use pdf_dict_get instead of pdf_dict_gets with constant strings.
2018-03-22Use pdf_add_new_dict family of functions.Tor Andersson
2018-03-22Add pdf_add_new_dict family of functions.Tor Andersson
Create a new empty dictionary, add it to the xref and return a new indirect reference object that points to it. This indirect reference needs to be dropped, since it was created with a function using the 'new' keyword.
2018-03-22Use pdf_dict_put_dict family of functions.Tor Andersson
2018-03-22Add pdf_dict_put_dict family of functions.Tor Andersson
pdf_dict_put_dict creates a new empty dictionary, inserts it into the parent dictionary, and returns a borrowed reference to it. These functions should simplify document creation by removing the need to wrap creation with try/catch for reference counting cleanup.
2018-03-22Add pkcs7 helper library to win32 viewer and mujstest tool.Tor Andersson
2018-03-22Add more version number #defines.Tor Andersson
2018-03-22html: Build box model for tables.Tor Andersson
Does not layout the table boxes properly yet.
2018-03-22html: Keep 'b' instead of 'h' in boxes.Tor Andersson
2018-03-22Add fz_output encoding filters.Tor Andersson
2018-03-22Fall back to PDF document handler if no handler is found.Tor Andersson
2018-03-22Check in script used to create encoding tables.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-22Auto-size HTML layout if layout page height is 0.Tor Andersson
Ignore page boundaries and CSS page breaks when page height is 0.
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-22Fix 699085: Use at most 16 bytes from MD5 digests.Sebastian Rasmussen
Previously crypt->len / 8 could be 0..32. In the case of crypt->len == 256 this meant that when an 16 byte MD5 was computed, uninitalized key data would be accessed because 32 bytes of key data was accessed. Now crypt->len / 8 is limited to 0..16. So when the 16 byte MD5 is computed and later accessed only the initialized part of the key data is accessed. Because crypt->len / 8 is now limited to 0..16 the key data buffer can also be shrunk to 16 bytes without risking the code stepping over its boundaries.
2018-03-22Rearrange user password authentication code.Sebastian Rasmussen
pdf_authenticate_user_password() now looks similar to pdf_compute_user_password(), easing readability.
2018-03-22Fix 699130: Handle missing arguments in directives in mutool create.Sebastian Rasmussen
2018-03-22Fix leak of form object when updating text appearance.Sebastian Rasmussen
2018-03-22Update to latest jbig2dec.Sebastian Rasmussen