summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-10-01Use malformed shading entries as far as possibleSebastian Rasmussen
The rest of the shading code and source code for other cases already handles malformed entries in the same way.
2012-10-01Give better warnings for out of bounds values in shadingsSebastian Rasmussen
2012-10-01Handle axial and radial shadings the same way as other shadings.Sebastian Rasmussen
2012-10-01Bug 693330: Change shadings to decompose to meshes at render time.Robin Watts
Currently, the mupdf code loads shadings at parse time, and instantly decomposes them into a mesh of triangles. This mesh of triangles is the transformed and rendered as required. Unfortunately the storage space for the mesh is typically much greater than the original representation. In this commit, we move the shading stream parsing/decomposition code into a general 'fz_process_mesh' function within res_shade. We then grab a copy of the buffer at load time, and 'process' (decompose/paint) at render time. For the test file on the bug, memory falls from the reported 660Mb to 30Mb. For another test file (txt9780547775815_ingested.pdf page 271) it reduces memory use from 750Meg to 33Meg. These figures could be further reduced by storing the compressed streams from the pdf file rather than the uncompressed ones. Incorporating typo fix and unused function removal from Sebras. Thanks. Remove unused function in shading code
2012-09-26Use 'artifex' branch of third party openjpeg library.Tor Andersson
Version 1.5.0 with revisions 1728 and 1730 included from SVN.
2012-09-26Add thirdparty libraries as git submodules.Tor Andersson
jbig2dec latest freetype 2.4.10 jpeg 9 openjpeg 1.5.0 zlib 1.2.7 Update MSVC projects for thirdparty libraries as submodules. Improve thirdparty library availability checks in Makethird by checking for the existence of a README file instead of just the directory, since a checkout without active git submodules has empty directories for the third party libraries.
2012-09-26Implement oversized text clipping and stroked text clipping.Robin Watts
We'd never got around to implementing text clipping with oversized glyphs before, at least partly due to a lack of files showing the problem. Now, thanks to a file from Paul Hudson, we have an example and hence a fix.
2012-09-25Forms: support doc.mailDoc.Paul Gardiner
2012-09-25Javascript: support test for booleanPaul Gardiner
2012-09-25Forms: handle app.launchUrl, currently by displaying a warningPaul Gardiner
2012-09-25Some gitignore updatesPaul Gardiner
2012-09-25Forms: show warning for use of app.execDialogPaul Gardiner
app.execDialog looks very difficult to support. Hopefully we wont have to
2012-09-25Forms: handle app.execMenuItem (presently just as a not-supported warning)Paul Gardiner
The name of the menu item is passed, so presumably the app could respond to some of the possibilities.
2012-09-25Avoid possible buffer overflow in pdfapp_warnPaul Gardiner
2012-09-21Add ifdef option to embed either the small or full CJK fallback font.Tor Andersson
The default is to embed the full font.
2012-09-21Update DroidSansFallback font.Tor Andersson
Update DroidSansFallback to version 2.54b and add DroidSansFallbackFull at version 2.56. These are the same fonts except the "Full" font also contains characters for CJK Ext A.
2012-09-21Update CMap resources to latest version from Adobe.Tor Andersson
2012-09-21When we are growing an fz_buffer, ensure it doesn't stay 0 sized.Robin Watts
Simple tweak, was causing problems in pdf_write.
2012-09-21Move defaulting of image params into predictor function.Robin Watts
This makes no difference to the current operation of the code, but ensures that 'saner' values are put into the image_params structure. This will help pdfwrite give more aesthetically pleasing output later.
2012-09-19Android: make bitmap creation part of the synchronised drawPage methodPaul Gardiner
If the user rapidly changes page, many drawPage calls can be queued for many page views, each holding a reference to a bitmap. This change ensures that bitmap creation will be delayed until the bitmaps of other views will be gc'able, thus fixing bug 693230: "Mupdf/android provokes out of memory when continuously rendering pages in pdf with large images".
2012-09-19Forms: handle print request, both from javascript and from named actionPaul Gardiner
Currently the app windows app responds with a message box explaining that the MuPDF library passes print requests to the app, but the app does not implement printing.
2012-09-19Forms: ensure result from alert callback is passed back to callerPaul Gardiner
2012-09-19Forms: handle 'additional' actions for mouse up and mouse downPaul Gardiner
2012-09-19Forms: correct bug in form resetPaul Gardiner
If the 'fields' parameter is not present then all fields should be reset
2012-09-18Forms: add event handling api and specifically support for javascript alertPaul Gardiner
2012-09-18Forms: support property access in the javascript enginePaul Gardiner
2012-09-18Forms: improve cpp/c interface regarding exceptionsPaul Gardiner
Three alterations: We were previously being careful to avoid throwing exceptions in the DOM-implementation callbacks because these were being called directly from C++. This commit adds three veneers that turn exceptions into warnings, hence allowing the callbacks to be written in usual mupdf style. Protect the "field" callbacks from executing with a NULL field. Ensure that the event object is set up before executing A actions
2012-09-18Forms: document event apiPaul Gardiner
2012-09-06Add pdf_dict_puts_drop function.Robin Watts
Does the same as pdf_dict_puts, but guarantees to always drop the value passed in (even if the function throws an error). This allows calling code to have a much simpler life in some cases. Update pdf_write to make use of this. Also, fix pdf_dict_puts so it doesn't leak the key object that it creates in the event of an error while growing the dictionary.
2012-09-06Update android makefile to build with the newly merged forms code.Tor Andersson
2012-09-04Tweak fz_keep_stream to cope with NULL.Robin Watts
Simplifies coding.
2012-09-04Tweak to allow building on metro.Robin Watts
Limited testing seems to suggest that the only thing stopping the MuPDF library building on metro seems to be the use of winsock.h.
2012-09-04Make pdf resource localisation procedure non-static.Robin Watts
And add a flag in the xref for evey PDF document to say whether it has been localised or not; this will be important for PDF editing to avoid us having to localise on every edit.
2012-09-04Tweak VS solution to solve build issues.Robin Watts
Make libmupdf-v8 depend on libmupdf. This dependency isn't true, but it stops both things trying to call fontdump at the same time during the build, which causes build failures.
2012-09-04Fix Release and Memento builds under VS.Robin Watts
Include paths for thirdparty stuff were wrong.
2012-09-04Improve error message when an object is missing from the xref.Tor Andersson
2012-09-04Fix error message/comment typos.Sebastian Rasmussen
2012-09-04Prevent recursive image soft masks from being loadedSebastian Rasmussen
Print a warning instead and ignore the soft mask
2012-09-04Don't adjust stream lengths for encrypted documents when repairingSebastian Rasmussen
Fixes http://bugs.ghostscript.com/show_bug.cgi?id=693314
2012-09-04Merge branch 'master' into formsPaul Gardiner
Conflicts: pdf/pdf_xref_aux.c
2012-09-04Forms: mass renaming for the sake of consistencyPaul Gardiner
2012-08-31Forms: rework form reset action to use new method introduced for JSPaul Gardiner
2012-08-31Forms: implement javascript doc.resetForm methodPaul Gardiner
2012-08-31Forms: provide js engine method for determining object typePaul Gardiner
2012-08-31Forms: don't focus hidden fieldsPaul Gardiner
2012-08-31Forms: keep checkbox and radio button values up to datePaul Gardiner
2012-08-29Forms: implement javascript Field.display propertyPaul Gardiner
2012-08-29Handle missing clear codes in LZW.Sebastian Rasmussen
Previously if the lookup table was full and no clear code appeared the decoder would try to add more entries to the table. However the table is of fixed size (4096 entries) so it would write outside the table. Fix this by detecting when the lookup table is full and a clear code ought to appear. At this point the decoder will now treat and process any code as a clear code. For valid documents this will never happen, for invalid documents this means risking that succeeding codes may be misinterpreted and that the decoded data will be incorrect, this case should be handled by the consumer of the data though. Fixes bug 693306.
2012-08-29Merge branch 'master' into formsPaul Gardiner
Conflicts: cbz/mucbz.c pdf/pdf_parse.c pdf/pdf_form.c xps/xps_zip.c
2012-08-28Add fz_open_document_with_stream function.Tor Andersson
Use a "magic" string for filetype detection: filename or mime-type.