summaryrefslogtreecommitdiff
path: root/pdf
AgeCommit message (Collapse)Author
2012-05-16JavaScript: provide mechanism via which C++ js engines can fz_throw errorsPaul Gardiner
2012-05-15Add a dummy pdf_js implementation for use in non-form-supporting buildsPaul Gardiner
The calc.pdf specific version of pdf_jsimp is no longer needed and hence dropped.
2012-05-15JavaScript: arrange for v8 gc to destroy native-side objectsPaul Gardiner
2012-05-15Forms: make forms API separate to the main document APIPaul Gardiner
This also provides a way to test whether interactive methods are supported.
2012-05-08JavaScript: add v8 implementationPaul Gardiner
2012-05-08Forms: use existing appearance stream Tm when present and handle alignmentPaul Gardiner
2012-05-08Hardcode %.8f format used by calc.pdf for nowPaul Gardiner
2012-05-08Free javascript types and objects correctlyPaul Gardiner
2012-05-08Use defaults from AcroForm dict when attributes missing in field heirarchyPaul Gardiner
2012-05-08Implement dummy JavaScript engine just for the sake of viewing calc.pdfPaul Gardiner
2012-05-08First go at Javascript-engine abstract APIPaul Gardiner
2012-05-08Forms: replace the marked content rather than the entire streamPaul Gardiner
2012-05-08Forms: use a text matrix to fit text rather than altering the font sizePaul Gardiner
To achieve sufficient accuracy, non-integer font sizes were being used, which MuPDF can handle, but may be illegal. The text matrix is the better method.
2012-05-08Forms: fix the base line for fit to width textPaul Gardiner
2012-05-08Forms: update field value on text entryPaul Gardiner
2012-05-08Forms: handle scaling text to fitPaul Gardiner
2012-05-08Forms: initialise stream contents of freshly created text appearance streamsPaul Gardiner
ensures that saving before the user fills out the field will put sensible contents in the file.
2012-05-08Forms: centre text verticallyPaul Gardiner
2012-05-08Forms: handle font size zero in default appearancePaul Gardiner
2012-05-08Forms: create apearance streams for text fields when not present in the filePaul Gardiner
2012-05-08Forms: handle some cases of setting text-field textPaul Gardiner
2012-05-08Forms: part of text field handlingPaul Gardiner
2012-05-08Forms: initial simple handling of check boxes and radio buttonsPaul Gardiner
2012-05-08Forms: handle field appearance change on mouse up/downPaul Gardiner
2012-05-07A few general utility functions added for the sake of the forms workPaul Gardiner
2012-04-22Avoid leaking the page stack in pdf_load_page_tree_node.Robin Watts
I forgot to free the stack in the reworked page loading. Fixed here. Thanks to Zeniko for pointing it out.
2012-04-21Correct mistake in fz_meta.Robin Watts
We were mapping from one enum range to another, and then using the unmapped value.
2012-04-21Big 692996: Eliminate recursion to avoid exception stack overflows.Robin Watts
Avoid recursion in pdf_load_page_tree_node. Avoid recursion (most of the time) in pdf_read_xref_sections.
2012-04-19Bug 692847: Tiling problem fix.Robin Watts
The test in mupdf for 'is more than one tile needed' is wrong, as it assumes that tile bboxes start at 0. Fix that, and everything else should work OK.
2012-04-17Add Meta interface to fz_document.Robin Watts
Use this to reintroduce "Document Properties..." in mupdf viewer.
2012-04-16Reduce the changes that mupdfclean makes to floats.Robin Watts
Most of the changes mupdfclean makes to a file are purely textual (streams are decompressed etc), but some objects can undergo changes due to being read in, and then written out. Notably in this class are floats. For instance, the mediabox in Bug689189.pdf contains 2125.984, which when written out with the current code gives 2125.98. This is enough of a difference to cause rendering changes. By upping the precision (instead of %g use, %1.9g) we get better results; we now output 2125.9839, which is much closer (and in fact has the same float representation when read back in). This drastically reduces the differences between a rendering of Bug689189.pdf and the uncompressed version, but we still have differences - in shadings, it seems.
2012-04-05Fix potential problems on malloc failure.Robin Watts
Don't reset the size of arrays until we have successfully resized them.
2012-04-05Don't unlock a lock we don't own.Robin Watts
While debugging Bug 692943, I spotted a case where we can attempt to unlock the file while we don't hold the file lock due to an error being thrown while we momentarily drop that lock. Simple solution is to add a new fz_try()/fz_catch() to retake the lock in such an error circumstance.
2012-04-05Bug 692141 - Work around bug in VS2005 Team SuiteRobin Watts
Put the logf call in it's own statement to fix a stupid header file bug.
2012-03-28Whitespace fixes.Tor Andersson
2012-03-19Bug 692669: Snap Rotate values for pages to be a multiple of 90Robin Watts
Previously we attempted to honour page rotation values, which is technically against the spec.
2012-03-19Bug 692746; avoid 'double palettes' on jpx images.Robin Watts
It seems that JPX images can be supplied in indexed format, with both a palette internal to the jpx stream, and a palette in the PDF. Googling seems to suggest that the internal palette should be ignored in this case, and the external palette applied. Fortunately, since OpenJPEG-1.5 there is a flag that can be used to tell OpenJPEG not to decode palettes. We update the code here to spot that there is an external palette, and to set this flag.
2012-03-15Bug 692874: Fix Launch annotations.Robin Watts
Looks like my launch annotation code was incorrect, hence giving the empty string for all FZ_LINK_LAUNCH types; fixed here.
2012-03-14Bug 692917: Move to dynamic stroke_states.Robin Watts
Move fz_stroke_state from being a simple structure whose contents are copied repeatedly to being a dynamically allocated reference counted object so we can cope with large numbers of entries in the dash array.
2012-03-14Warn not throw on indirection cycles in pdf_resolve_indirect.Robin Watts
When we fail to be able to cache an object, we warn and return NULL. An indirection cycle should probably be treated the same way. From SumatraMuPDF.patch - Many thanks.
2012-03-14Avoid NULL dereferences in error cases when trying to warn.Robin Watts
Spotted from SumatraMuPDF.patch. Many thanks.
2012-03-13Add ctx argument and rename fz_bound_pixmap to fz_pixmap_bbox.Tor Andersson
2012-03-13Rename some functions and accessors to be more consistent.Tor Andersson
Debug printing functions: debug -> print. Accessors: get noun attribute -> noun attribute. Find -> lookup when the returned value is not reference counted. pixmap_with_rect -> pixmap_with_bbox. We are reserving the word "find" to mean lookups that give ownership of objects to the caller. Lookup is used in other places where the ownership is not transferred, or simple values are returned. The rename is done by the sed script in scripts/rename3.sed
2012-03-12Merge branch 'master' into header-splitRobin Watts
2012-03-12Squash MSVC warning.Robin Watts
2012-03-12Fix bitshifting by a negative amount in PS functionsRobin Watts
When bitshifting by a negative amount, we should shift right; thanks to Sebras' work in this area, I spotted that we are attempting to shift right by a negative number.
2012-03-12Take care of boundary conditions in ps function evaluation.Sebastian Rasmussen
Floating point numbers are now clamped, division by zero is approximated by minimum or maximum value and NaN results in 1.0.
2012-03-07More release tidyups.Robin Watts
Add some function documentation to fitz.h. Add fz_ prefix to runetochar, chartorune, runelen etc. Change fz_runetochar to avoid passing unnecessary pointer.
2012-03-07Splitting tweaks.Tor Andersson
2012-03-06Split fitz.h/mupdf.h into internal/external headers.Robin Watts
Attempt to separate public API from internal functions.