summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-10-09Fix typo in pixmap handling.Robin Watts
When creating a png, a typo meant that we ALWAYS converted the pixmap even when we had an rgb or grayscale image on entry. Also, treat mask pixmaps (no colorspace) as gray.
2013-10-09iOS: ensure link highlights scale correctly on zoom and stay visiblePaul Gardiner
2013-10-09iOS: implement internal-link followingPaul Gardiner
Also: add hooks for the other link types remove unnecessary protocol from MuPageViewReflow turn off optimizations for the debug build
2013-10-07SVG device: Send text as reusable pathsRobin Watts
2013-10-07Update SVG device to send text as pathsRobin Watts
2013-10-04Android: Fix reference overflow in mupdf.cRobin Watts
Ink attachments of more than 512 points can run us out of local references. Fix this by freeing as we go.
2013-10-02iOS: unify the drawing of the main image and the tilePaul Gardiner
2013-10-02iOS: rework some positioning calclationsPaul Gardiner
The new code yields the same result as that that it replaces, but might be easier to understand.
2013-10-02iOS: Introduce use of display listsPaul Gardiner
Also add exception handling around library calls
2013-09-30Disable image interpolation with a hint.Robin Watts
Set the hint in mudraw when AA bits is set to 0.
2013-09-30Bug 694526: Spot non-invertable matrices and bale before strokingRobin Watts
The bug fix added in the previous commit fails to work in this case (hang-9527.pdf) because the matrix is not invertible and hence the clipping rectangle ends up infinite. Spot this case here and return early.
2013-09-30Bug 694526: Fix hang in stroking path.Robin Watts
The first file of this bug (hang-66.pdf) hangs while stroking a VERY long line segment; so long that 'used' is sufficinetly large that: used += dash_segment_len doesn't result in a change in the value of used. The fix is to clip strokes to the edge of the gel's clip area, meaning that this should never occur.
2013-09-30make pdf_write_document again accept NULL for fz_optsSimon Bünzli
In order to prevent this from breaking again, a fz_write_options struct with default values is allocated locally and used whenever fz_opts is NULL.
2013-09-27fix bug 694573Simon Bünzli
Currently, MuPDF throws away entire CCITT encoded images whenever an error happens in the code stream. Other PDF readers seem to rather render what has been decoded up to the point of the error. This patch enables such behavior for MuPDF as well.
2013-09-27add support for .tga output to mudrawSimon Bünzli
SumatraPDF's testsuite uses Targa images as output because they're compressed while still far easier to compare than PNG and have better tool support than PCL/PWG.
2013-09-27fix some MSVC warningsSimon Bünzli
* unreachable code in fz_generate_transition * signed/unsigned comparison in get_comp_index * potential dataloss due to conversion from int to short in ucdn_mirror
2013-09-27tweak pdf_parse_actionSimon Bünzli
* Destination names are a name and not a string * Expose whether a /Launch action points to a path or a URI
2013-09-27don't color transform RGB JPEG-in-TIFF imagesSimon Bünzli
TIFF images containing JPEG data only require color transformation for CYMK data streams. For RGB streams, this could lead to unexpected results.
2013-09-27don't reset the clipping rectangle for accumulated textSimon Bünzli
FZ_CMD_CLIP_TEXT behaves quite differently whether the accumulate flag is set or not (see fz_list_clip_text). fz_run_display_list handles this correctly but fz_append_display_node doesn't do so yet.
2013-09-27clip flate stream on data check error instead of rejecting it wholesaleSimon Bünzli
This is required e.g. for 1798_-_zlib_incorrect_data_check.pdf .
2013-09-27preserve /Encrypt for documents with streamed xrefsRobin Watts
If /Encrypt is not present on an updated xref of an encrypted document, that document can no longer be opened. This is required for incremental saving. Note: Streams aren't encrypted by pdf_write_document and can't thus currently be appended to an encrypted document. In that case, saving non-incrementally will produce a working (non-encrypted) document.
2013-09-27stop checking if the result of fz_read is negativeSimon Bünzli
fz_read used to return a negative value on errors. With the introduction of fz_try/fz_catch, it throws an error instead and always returns non-negative values. This removes the pointless checks.
2013-09-27fix bug 694618Simon Bünzli
For Separation and DeviceN colorspaces, the initial color value is 1.0 for all components instead of 0.0 as for most other colorspaces. The current initialization in pdf_set_colorspace initializes for CMYK which happens to work for all non-tint colorspaces.
2013-09-27Fix typo in struct definition.Robin Watts
Thanks to Zaister for reporting this.
2013-09-25Android: while adjusting reflow zoom, refresh only the visible pagePaul Gardiner
Also fix a race condition where an attempt to set the zoom might precede the loading of html into the WebView
2013-09-25iOS: while adjusting reflow zoom, refresh only the visible pagePaul Gardiner
At end of gesture all pages are refreshed so that newly-becoming-visible pages appear at the correct zoom.
2013-09-24iOS: add reflow modePaul Gardiner
2013-09-24iOS: use ObjC-level ref counting to control lifetime of fz_documentPaul Gardiner
With the latest version if iOS, timing changes were causing crashes during close down of a MuDocumentController. This change isolates us from those changes.
2013-09-24Android: fix missing fz_varsPaul Gardiner
2013-09-24Bug 694566: Avoid locking up while seeking in deflated stream.Robin Watts
In streams that we cannot seek in (such as flate ones) we implement seeking forward by skipping bytes. We failed to spot that we hit EOF, and spent ages just looping. Fix is simply to spot that we hit EOF and bale with a warning.
2013-09-24Bug 694557: Fix infinite loop in pdf_lex.Robin Watts
When we read a '>' during lexing, we try to read another char to see if it's another '>'. If not, we warn that it's unexpected, put the char back and retry. Putting the char back fails if the '>' was the last char in the stream as we will then have read EOF. We then loop and reread the '>' resulting in an infinite loop. Simple fix is to check for EOF.
2013-09-23Bug 694565: Cope with negative xref counts when reading old trailers.Robin Watts
This was causing an infinite loop.
2013-09-23Fix missing 'const' in fz_authenticate_passwordRobin Watts
The pdf_ versions were already correct. Probably just an oversight that this was missed.
2013-09-23Bug 694653: Watch for xref being NULL in pdf_xref_lenRobin Watts
This can occur early on during xref repair.
2013-09-17iOS: split the classes into separate filesPaul Gardiner
2013-09-17iOS: use the background thread for CGDataProviderCreateWithData's callbackPaul Gardiner
2013-09-16iOS: avoid XCode's passed environment breaking the "generated" buildPaul Gardiner
2013-09-16Android: remove use of Bitmap holder and avoid memory churnPaul Gardiner
Now use one-time allocation of page-sized bitmaps
2013-09-13prevent heap underflow in pdf_read_new_xrefSimon Bünzli
2013-09-13Fix various compile warnings spotted by the cluster.Robin Watts
2013-09-10Attempt to fix reflow.Robin Watts
2013-09-10tolerate xobjects with invalid colorspacesSimon Bünzli
This fixes 2258_-_invalid_transparency_group_colorspace.pdf
2013-09-10correctly set indexed colors in pdf_set_colorSimon Bünzli
Required for 1879_-_Indexed_colors_wrongly_converted.pdf Also, removing broken code in the same place (where mat->v[] is overwritten right after being set in the L*a*b* case).
2013-09-10support /Alternate colorspace for ICC basedSimon Bünzli
This progresses among others Bug689803.pdf and Alternate_colorspace_for_ICCBased_not_supported.pdf
2013-09-10support jpegtables for TIFF imagesSimon Bünzli
This is required e.g. for 2314 - jpeg tables in tiff.xps. This folds fz_open_resized_dct back into fz_open_dct instead of adding further variations for calls with and without the jpegtables argument.
2013-09-10Bug 694567: prevent double-free in pdf_open_raw_filterSimon Bünzli
If opening a filter in pdf_open_crypt throws, the stream is closed in the used fz_open_* method and thus mustn't be closed again.
2013-09-08Separate command and coordinate arrays in fz_path structure.Tor Andersson
2013-09-08ios: Clean up project file.Tor Andersson
Strip stupid project build settings. Add proper "make generate" target that uses the 'macosx' sdkroot. Rewrite cross compile build script to be more future proof.
2013-09-08Update thirdparty.txt to include curlChris Liddell
2013-09-06Fix problem with object dirty flagPaul Gardiner
There is the possibility of marking an object dirty via one indirection and testing it via another. This patch ensures that is handled correctly. The scenario occurred within calc.pdf and stopped the update of the display field.