summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
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-22Add pdf_new_text_string utility function.Tor Andersson
Create a PDF 'text string' type string from a UTF-8 input string. If the input is plain ASCII, keep it as is, otherwise re-encode it as UTF-16BE.
2017-11-22jni: Make sure to dirty annotation whenever it changes.Fred Ross-Perry
2017-11-14Ensure that after_text functions get ctm.Robin Watts
Also wrap their contents in q/Q, so they can't screw up the rest of the stream.
2017-11-10Remove fz_android_fprintf.Tor Andersson
Use android logging for throw/warn like we do with OutputDebugString on windows.
2017-11-10Purge obsolete NDK_PROFILER code.Tor Andersson
2017-11-09Bug 698353: Avoid having our API depend on DEBUG/NDEBUG.Robin Watts
Currently, our API uses static inlines for fz_lock and fz_unlock, the definitions for which depend on whether we build NDEBUG or not. This isn't ideal as it causes problems when people link a release binary with a debug lib (or vice versa). We really want to continue to use static inlines for the locking functions as used from MuPDF, as we hit them hard in the keep/drop functions. We therefore remove fz_lock/fz_unlock from the public API entirely. Accordingly, we move the fz_lock/fz_unlock static inlines into fitz-imp.h (an internal header), together with the fz_keep_.../fz_drop_... functions. We then have public fz_lock/fz_unlock functions for any external callers to use that are free of compilications. At the same time, to avoid another indirection, we change from holding the locking functions as a pointer to a struct to a struct itself.
2017-11-08Clean up and speed up text searching.Tor Andersson
2017-11-08Select and copy structured text by lines.Tor Andersson
2017-11-08Remove broken bidi reordering code.Tor Andersson
TODO: Implement visual to logical reordering on the fly when building the structured text line.
2017-11-08Move static inline function out of header.Tor Andersson
2017-11-06Expose text filtering through pdf_clean interface.Robin Watts
2017-11-06Use text state handling in pdf_filter_processor to filter text.Robin Watts
2017-11-06Extract text state handling from run pdf_processor.Robin Watts
So it can be used in the filter pdf_processor too.
2017-11-02Fixes for win32 build.Tor Andersson
2017-11-01Add separate fz_close_output step.Tor Andersson
Closing flushes output and may throw exceptions. Dropping frees the state and never throws exceptions.
2017-11-01Use int64_t for public file API offsets.Tor Andersson
Don't mess with conditional compilation with LARGEFILE -- always expose 64-bit file offsets in our public API.
2017-10-25Fix multithreaded crash with tiled regions.Robin Watts
Michael has found a crash when scrolling quickly through pages with gsview. 2 Threads are redrawing at the same time from a display list. The problem comes when both threads happen to be trying to draw the same tile from the cache at the same time. The current code alters the ->{x,y} values of the pixmap from the cache as it tiles. If 2 threads are using the same tile at the same time, this causes a race condition which can upset the clipping calculations and we can access out of range. The solution is to make a new 'wrapper' fz_pixmap around the same data, and to alter the x/y values there instead. We therefore introduce a (hopefully generally useful) function fz_new_pixmap_from_pixmap, and use that.
2017-10-25Add fz_new_icc_colorspace_from_stream.Robin Watts
2017-10-24Add interface for setting icc space to bgr formatMichael Vrhel
This is needed so that we can have bgr formatting with something other than the default sRGB
2017-10-24Fix separations object handling when cloning for spots.Robin Watts
The 'producing spots' case is poorly tested, but I believe we should be keeping the spot information internally, rather than NULLing it out.
2017-10-24Improved overprint (simulation) control.Robin Watts
First, we add an fz_page_overprint function to detect if a page uses overprint. Only PDF implements this currently (other formats all return false). PDF looks for '/OP true' in any ExtGState entry. We make Mutool check this. If it finds it, and spot rendering is not completely disabled, then it ensures that the separation object passed to the pixmap into which we draw is non NULL. This causes the draw device to do overprint simulation. We ensure that mutool draw defaults to having the spot rendering mode default to simulation in builds that support it. Finally, we ensure that if an output intent is set by the document, and spot rendering is not completely disabled, then we ensure the seps object is non NULL so that we render to a group in the specified output intent, and THEN convert down to the required colorspace for the output. This should make us match acrobats behaviour.
2017-10-24Add support for use of proofing profile.Robin Watts
This is a first cut to get us to demo-ability. There will likely be a few changes as we do a bit more testing with different scenarios with Gray, RGB, CMYK combos of destination, proof and output intent ICC profiles.
2017-10-24Make a public fz_new_icc_colorspace_from_file function.Tor Andersson
2017-10-24Make sure shades use proper "default" color space.Michael Vrhel
Fixes some issues in Altona test file.
2017-10-24Look for changes to Default colorspaces in XObjects.Robin Watts
2017-10-24Don't apply default decode array to ICC Lab image data.Robin Watts
Adjust the decode array to allow for the fact that the default decode is done by the ICC code.
2017-10-24Only do proof conversion in final pop.Michael Vrhel
The proof conversion should only be done after we have done all our drawing in the separations group. Fixes issue in page 7 of Altona test.
2017-10-24Fix overprint with shadings.Robin Watts
2017-10-24Add FZ_ENABLE_SPOT_RENDERING define.Robin Watts
2017-10-24Change colorspace 'device_n' field to be a flags word.Robin Watts
2017-10-24Logic for Sep and DeviceN colorspaces with C,M,Y, or K.Michael Vrhel
Special care is required when the DeviceN color space has cyan, magenta, yellow or black. For example, even if we support separations in the destination, if the color space has CMY or K as one of its colorants and we are drawing to an RGB or Gray pixmap we will want to do the tint transform. Also if the pixmap has no seps memember present, we support the separations if the destination is CMYK and the DeviceN colorspace has no "Spot" (non-CMYK) colorants.
2017-10-13Add fz_deflate family of functions.Robin Watts
This gives us a friendlier interface to zlib. Simplifies PNG output and PCLM output code.
2017-10-13Simple PCLm device.Robin Watts
Both bandwriter and document_writer interfaces cope with multi page docs. Update mudraw to output pclm format too. Incorporates fixes from Tor.
2017-10-13Fix further problem seen in PDF_2.0_FTS/fts_23_2311.pdfRobin Watts
This file has a type 3 font in it. It first uses a 'd1' glyph, that uses a pattern. Accordingly, we we render that pattern to a mask tile and store that tile. Then it uses a 'd0' glyph, which uses the same pattern. The cache is checked, and we erroneously pick up the cached tile to reuse it - but this is not a colored rendering, so we assert on plotting. The fix is to ensure that the required colorspaces match. This requires us to add the colorspace to the tile key. Unfortunately, this means that colorspaces have to become key_storable, so the patch is slightly larger than would otherwise be the case.
2017-10-12Don't cache page count in pdf_document.Tor Andersson
Make sure any changes to the page tree are always reflected immediately. The rev_page_map lookup cache exists when we load the outlines in order to resolve links faster, so we don't need to worry about that one. The linear_page_refs stuff is more troublesome, so don't mix editing a PDF with progressive loading!
2017-10-12Refactor image format magic signature recognition into its own function.Tor Andersson
2017-10-12Fix pdf_widget/pdf_annot typedefs. They are the same struct.Tor Andersson
2017-10-12Fix bug in murun when creating buffers from strings.Tor Andersson
The code only worked for string literals, not garbage collected or short strings.
2017-10-12Make fz_open_memory take a const buffer.Tor Andersson
2017-10-12Make image loading use const data pointers.Tor Andersson
2017-09-22Minor comment tweaks.Robin Watts
2017-09-20Remove comment markers about interfaces not throwing exceptions.Sebastian Rasmussen
2017-09-20gl: Scroll to link coordinates when following links.Tor Andersson
Also save link coordinates in outline nodes.
2017-09-13Consistently drop filter chain upon error.Sebastian Rasmussen
2017-09-12Fix Gradients in the presence of spots.Robin Watts
Incorporates fixes from Michael: When dealing with spot colors, if the destination space is pure CMYK and we have unsupported spots we can do a weighted addition of the spot CMYK colorant like Adobe does in the PSD image format. If the destination space is RGB we need to do a traditional color mapping of each pixel.
2017-09-12Remove redundant #define that is only used at the same place it's set.Tor Andersson
2017-09-12Move fz_strcasecmp to the header it belongs to.Tor Andersson
2017-09-08Update fz_separations equivalent color mechanism.Robin Watts
Incorporates fixes from Michael. Rather than specifically giving it rgb and cmyk values, separations now include the colorspace. Conversions can then be done into ANY colorspace we need. Note, that we maintain the old way of working for the gproof device. Also, fix pdf_page_separations to correctly find all separations. This involves recursively looking through colorspaces, forms and shadings for colorspaces therein, making sure we don't run into any circular references. We do 2 passes, so that we can pick up as many colorants as Separations as possible. On the second pass we pick up any colorants we missed in terms of DeviceN spaces. The purpose of this is to try to ensure that we get as many tint transforms as single input functions as we can. This may not be important in the grand scheme of things, but seems neater.