summaryrefslogtreecommitdiff
path: root/fitz
AgeCommit message (Collapse)Author
2012-10-17First steps towards supporting transitions.Robin Watts
Only Fade, Wipe and Blinds supported so far. Hit 'p' in the viewer to go into 'presentation' mode. Page swaps then transition from page to page. Pages auto advance until key or mouse is used.
2012-10-17Fix warning; pdf_js_supported not prototyped.Robin Watts
Nasty fix; an inline declaration within doc_document.c, but that's in keeping with the current code there.
2012-10-11Android Forms: pass in mouse events and handle updatingPaul Gardiner
Also add a function to report whether the core has javascript support, so that the additional features can be enabled only when the javascript engine is present
2012-10-08Bug 693368: Fix typo "atin2f".Robin Watts
Silly typo in LOCAL_TRIG code. Thanks to Robert Jedrzejczyk for reporting this.
2012-10-08Fix SHA-384/-512 hash algorithm typosSebastian Rasmussen
These prevented PDF 1.7 ExtensionLevel 8 encryption algorithm from working as intended.
2012-10-05Bug 693346: Fix calculation of progress_maxRobin Watts
As zeniko points out, pointer arithmetic is pointless on a linked list. Keep a count of the length in the list header.
2012-10-05Move local implementation of trig function to internal headerSebastian Rasmussen
Previously these were only used for shadings in test builds. By the same argument that they are applied for shadings, it can be argued that they ought to be applied everywhere trig functions are used.
2012-10-05Make shadings hold the data streams compressed.Robin Watts
This reduces memory use by another 10% on the 2 testfiles mentioned in the previous commit (see bug 693330).
2012-10-05Refactor compressed stream loading.Robin Watts
Refactor 'short stopped' image stream loading into fz_compressed_buffer loading. Nicer overall, and reflects the fact that this can be used for non-image streams that we want to hold compressed in memory (for instance for shading streams). This is a preparatory step for pdfwrite, and enables further shading memory use optimisations. Remove unused jbig2 function pointer from the fz_compression_params (previously fz_image_params) structure to avoid confusion.
2012-10-01Move to consistently refer to "Linear" shadings rather than "Axial" ones.Robin Watts
Thanks to Sebras for pointing out our schitzophrenia here.
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-25Forms: support doc.mailDoc.Paul Gardiner
2012-09-25Forms: handle app.launchUrl, currently by displaying a warningPaul 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-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-18Forms: add event handling api and specifically support for javascript alertPaul Gardiner
2012-09-18Forms: document event apiPaul Gardiner
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-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-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.
2012-08-23Silence some warnings.Robin Watts
Mountian Lion causes various different warnings to be given, possibly because a change to clang by default. Fix them here.
2012-08-23Update Memento to match the version in gs.Robin Watts
This brings in Memento_breakOnRealloc and Memento_breakOnFree along with some other small tweaks.
2012-08-16Fix 64-bit integer typedefs for MSVC.Tor Andersson
2012-08-16Use ULL suffix for SHA512 constants.Tor Andersson
2012-08-16Read unsigned numbers in PNG parser to avoid negative numbersSebastian Rasmussen
Thanks to zeniko for pointing out this fix.
2012-08-16Add SHA-384/-512 hash algorithmsSebastian Rasmussen
2012-08-16Prepare for addition of SHA-384/-512Sebastian Rasmussen
Adjust macros to make them reusable with 64-bit arithmetic. Rename functions to avoid future namespace collisions.
2012-08-16Make 64-bit integers available everywhere in fitzSebastian Rasmussen
2012-08-16Forms: respond to failed validation in windows appPaul Gardiner
2012-08-08Consistent use of whitespace in XML in trace device. Also print image size.Tor Andersson
2012-08-08Merge branch 'master' into formsPaul Gardiner
Conflicts: Makefile apps/mudraw.c pdf/pdf_write.c win32/libmupdf-v8.vcproj
2012-08-07Remove fz_too_deeply_nested.Robin Watts
Rather than specifically checking for the nesting getting too deep and hence throwing an error, the error handling should do this for itself. Make it so that we spot the depth being too great in the fz_try() and throw to the fz_catch().
2012-08-06Remove old error mesages turned into comments when adding exceptionsSebastian Rasmussen
2012-08-06Free jpeg state upon decoding error, even if not fully initedSebastian Rasmussen
Previously the jpeg decoder state had to be fully initialized in order to be freed when the jpeg decoder is closed, e.g. due to an error. Now, signal that the decode state is initialized earlier, even if the state has not been fully initialized, so that the state is freed.
2012-08-06Make fz_open_file_*() always throw exceptions upon errorSebastian Rasmussen
Thanks to Zeniko for pointing out the inconsistency.
2012-08-06Fix locking bug in path strokingSebastian Rasmussen
Thanks to Zeniko for pointing out this fix.
2012-08-06Throw exception on too deeply nested arrays/dictsSebastian Rasmussen
Previously we would run out of error stacks in the context and fail abruptly. Now, throw an exception and hope for the best. At least this plugs any memory leaks.
2012-08-06Free decoded jpx image upon errorSebastian Rasmussen
Thanks to Zeniko for pointing out this fix.
2012-08-03Forms: add basic support for choice widgets to the Windows appPaul Gardiner
2012-08-02Forms: add document dirty flagPaul Gardiner
2012-08-01Merge branch 'master' into formsPaul Gardiner
Conflicts: pdf/mupdf-internal.h pdf/pdf_font.c
2012-07-20Pass original font name to fz_new_font from PDF interpreter.Tor Andersson
Improves text device output when using substitute fonts. Fixes bug #693019.
2012-07-17Handle glyphs that are too large to render as pixmaps.Tor Andersson