summaryrefslogtreecommitdiff
path: root/pdf/pdf_interpret.c
AgeCommit message (Collapse)Author
2011-09-14Initial import of exception handling codeRobin Watts
Import exception handling code from WSS, modified to fit into the fitz world. With this code we have 'real' fz_try/fz_catch/fz_rethrow functions, handling a fz_except type. We therefore rename the existing fz_throw/ fz_catch/fz_rethrow to be fz_error_make/fz_error_handle/fz_error_note. We don't actually use fz_try/fz_catch/fz_rethrow yet...
2011-09-06Don't invoke tiling device calls when there is only one tile to be drawn.Tor Andersson
2011-09-01Manage linewidth state correctly when rendering text with stroking.Tor Andersson
2011-09-01Use correct concatenation order for XObject matrix.Tor Andersson
2011-08-31Make in_array state a local variable to cope with broken XObject streams.Tor Andersson
2011-08-09Fix bug 692312.Tor Andersson
Make sure the CSI works from a clean slate in pdf_run_stream, since it may be called to draw a softmask form pdf_flush_text in the middle of parsing a TJ text array. Also guard against xobject failures by catching instead of rethrowing xobject parse errors so that the begin and end group draw calls are balanced.
2011-08-09Fix bug 692272: use the softmask_ctm when drawing soft masks.Tor Andersson
2011-08-06Allocate a re-entrant safe buffer for interpreting content streams.Tor Andersson
Fix bug 692282.
2011-08-01Add support for colored Type3 glyphs (ones that use d0).Robin Watts
Detect the d0 or d1 operators by writing a bit to the new device flags word. This can then be checked by the Type3 code to create the appropriate backing pixmap. In order to know what the appropriate backing pixmap is, we pass an additional colorspace into the glyph rendering code.
2011-07-13Non-isolated group support, and fix Bug 692336.Robin Watts
Firstly, this takes on some of Zenikos patch to correct the clip stack handling that was broken by the fix to bug 692287 (in commit 2c3bbbf). This bug should now be solved. We add a new 'shape' field to the draw device structure (and clip stack). When we are inside non-isolated groups, this is set to be a pixmap where we accumulate the 'shape' of the objects drawn. When we come to blend back, if we are blending a non-isolated group back, we have to use a different blending function that takes account of the shape. Various internal groups (the page group, and groups used to force blending) are set to be isolated to avoid carrying shape planes around when this is not required. All our rendering code now has to know how to maintain the shape plane as well as doing the basic rendering.
2011-07-08Clip area optimisations for displaylist case:Robin Watts
First, we add clipping rects to clipping functions. Various functions (the ones that handle clipping) are now additionally passed a rectangle that represents an additional bound for this clip in device space (i.e. it has already been mapped through the current ctm). Next, when constructing the displaylist, keep track of the bounding box for the contents of each clip. While writing the list, on every node we add, we add the bbox for that node to the enclosing clips content bbox (if there is an enclosing clip). When we pop a clip, write back to the corresponding push to update the bbox. This means if we get large clip regions, with only small areas used within them, we will only do the slow blending for those small areas. Finally, we fix a calculation in fz_bound_path which was incorrectly accounting for mitrelimits. This was showing up in testing on page 630 of the PDF reference v1.7.
2011-07-06Tweak mupdf clip path handling.Robin Watts
In the existing mupdf clip path code, it would be possible for us to render incorrectly; consider the following fragment of a content stream: 0 0 100 100 re W 50 50 100 100 re f That should set the clip path to the (0, 0) -> (100, 100) rectangle, and then attempt to fill both the (0,0) -> (100,100) rectangle and the (50,50) -> (150,150) rectangle, resulting in just the (0,0) -> (100,100) rectangle being filled. In the existing mupdf code, it would actually fill both rectangles as the path after the W operation (the addition of the second rectangle) would also affect the stored clip path. We solve this by doing the clip operation on the W operator, rather than deferred to when the path is actually disposed of.
2011-05-31Fix assert in scale: see Bug 692245.Robin Watts
Bug 692245 gives a file that produces a runtime assert in mupdf due to an extremely large ctm offset (unrepresentable in a float). We fix our code here so that such floats are always read as 1.0. In this particular case, the exact value read doesn't seem to matter. We match acrobat. We pick 1.0 rather than 0.0 as this is less likely to provoke division by 0 errors later on.
2011-04-25Always call glyph index "gid"; not "cid" as in some places.Tor Andersson
2011-04-11Add triangle caps; separate start, dash and end cap styles for XPS.Tor Andersson
2011-04-10Combine build and interpret to make csi, gstate and material private structs.Tor Andersson
2011-04-10Make blendmode opaque.Tor Andersson
2011-04-05Update the display list device to use the new device functions.Tor Andersson
2011-04-05Add wrapper functions around device calls.Tor Andersson
They test for NULL and make the code look nicer.
2011-04-05pdf: Fix segfault in pdf_is_hidden_ocg.Tor Andersson
2011-04-04Le Roi est mort, vive le Roi!Tor Andersson
The run-together words are dead! Long live the underscores! The postscript inspired naming convention of using all run-together words has served us well, but it is now time for more readable code. In this commit I have also added the sed script, rename.sed, that I used to convert the source. Use it on your patches and application code.
2011-04-04pdf: Rename mupdf directory.Tor Andersson