summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-05-16More clean up and also some work on getting things working for different ↵Michael Vrhel
orientation and scaling
2013-05-16Code clean up plus bug fix so we dont crash when opening a new fileMichael Vrhel
2013-05-16Some progress on the search resultsMichael Vrhel
2013-05-16Addition of preliminary search code and also addition of canvas in flipview itemMichael Vrhel
2013-05-16Initial commit of windowsRT viewer code.Michael Vrhel
Lots of issues to resolve still and plenty of requirements to do but it is a start.
2013-05-16Add PWG raster output to mudraw.Robin Watts
2013-05-16Fix off by one error in xref resizing.Robin Watts
Found by zeniko in his fuzzing tests. Many thanks!
2013-05-15PDF Pattern gstate fix.Robin Watts
The PDF Reference manual is very confusing about what gstate should be used to run patterns in. Essentially, my experiments seem to suggest that as we run through a PDF page, at the start of executing each stream, we should remember the current gstate as the 'parent' gstate. Then whenever we instantiate a pattern (via scn etc), we should set the pattern to remember that gstate. When we come to render the pattern, the pattern should be rendered using the remembered gstate, not the current one. This causes many progressions in our tests.
2013-05-14svgwrite: First attempt at an SVG output device.Robin Watts
No font support (just font names are sent through). No group support. No shading support. No image mask support. Line art, text position/size, bitmaps, clipping all seem to work though.
2013-05-10Tweak png outputting functions.Robin Watts
Allow us to get an image as a png in a buffer.
2013-05-10Update fz_bound_{text,path} functions.Robin Watts
Pass stroke state into fz_bound_text to allow for stroked text. Simplifies some calling code. Add consts to clarify the meanings of the calls.
2013-05-07Android: Fix android build.Robin Watts
Update android build in line with text extraction structure changes.
2013-05-06Fix formatting.Tor Andersson
2013-05-06Add simple visual-to-logic RTL reordering as a text extraction pass.Tor Andersson
2013-05-06Use linked list for text spans.Tor Andersson
2013-05-06Add UCDN unicode character library.Tor Andersson
2013-05-03Update mudraw to better spot output file types.Robin Watts
2013-05-03Simple Image file format recogniserRobin Watts
Now can open jpeg/png/tiff files within mupdf.
2013-05-03Simplify mesh rasterizer.Tor Andersson
Trace edges using floating point without pulling onto pixels. Use fixedpoint for colors.
2013-05-01Try to use ToUnicode cmap to encode identity-encoded substitute fonts.Tor Andersson
2013-05-01Never treat cid fonts as builtin.Tor Andersson
2013-04-30Move fz_normalize_vector into base_geometry.cTor Andersson
2013-04-30Split dev_text into three parts.Tor Andersson
One for the raw span extraction pass, one for paragraph sorting, and another for HTML output.
2013-04-30Move device hint functions to a more appropriate source file.Tor Andersson
2013-04-30Android: Update text handling in android specific code.Robin Watts
Need to update text handling in line with new object types due to image extraction.
2013-04-30Catch slow case in PDF tiling.Robin Watts
Sometimes a PDF file can use just a very small amount of a large tile; rendering the whole tile is a waste of time. Previous attempts to catch this case have worked for most cases, but can be defeated when the area needing rendering crosses a tile edge. Here we improve the formulation to catch exactly what we want. This implementation was driven by the example file in Sumatra PDFs bug tracker, for issue 2248, though the actual code change is different. Thanks to zeniko, nonetheless for this!
2013-04-29Android: Fix the makefile (again) for v8 or not.Robin Watts
Eventually I will get this right.
2013-04-29Internationalisation: Translations of strings.Robin Watts
2013-04-29x11: Copy to clipboard on Ctl+C.Tor Andersson
For better interoperability with non-unix-y apps that don't know about selection and middle-click paste, add the ability to use Ctl+C to copy the selected text to the clipboard. Thanks to Sebras for original patch.
2013-04-29Update debian packageSebastian Rasmussen
2013-04-29Fix copyright statementsSebastian Rasmussen
2013-04-29Correct pkg-config dependency to libopenjpeg1Sebastian Rasmussen
2013-04-29Bug 693939: Fix memory problems.Robin Watts
2 more memory problems pointed out by mhfan - many thanks. In the text device, run through the line height list to it's length, not to it's capacity. In the X11 image code, when copying data unchanged, copy whole ints, not just the first quarter of the bytes.
2013-04-29Add Memento build option to Android build. Fix memory leaks.Robin Watts
Following up on a report from a potential customer, fix various places in mupdf.c where we were leaking memory (devices not freed, context not properly freed etc). In order to track this down, I added a Memento build - just do: ndk-build MEMENTO=1 when building. This only checks for leaks, not for memory overwrites by default as it uses MEMENTO_LEAKONLY to avoid any possibility of the android kernel killing stuff for being too slow or using too much memory.
2013-04-29Android: Missed renaming of function.Robin Watts
We renamed fz_new_output_buffer to be fz_new_output_with_buffer, and missed the call from the Android specific source. Fixed here. Thanks to Philippe Le Becq for the report.
2013-04-29Fix various leaks in the dev_text device.Robin Watts
Thanks to mhfan for the reports.
2013-04-26Clean up some formatting.Tor Andersson
2013-04-26Rename functions for consistency.Robin Watts
Rename fz_new_output_buffer to be fz_new_output_with_buffer. Rename fz_new_output_file to be fz_new_output_with_file. This is more consistent with other functions such as fz_new_pixmap_with_data.
2013-04-26Fix dirty flag handling bug in X11 event loop.Robin Watts
When I added transition handling to mupdf, I broke the X11 behaviour of coalescing all events and only blitting when idle. This commit restores that behaviour, except when transitions are actually in progress (when it still blits instantly).
2013-04-26Bug 693845: Vertical motion in PDF.Robin Watts
Ignore sign of font size when calculating X offset in vertical motion for fonts.
2013-04-26Fix SNAFU in the store handling.Robin Watts
When the store fills up, the existing code throws away items to make room. Due to a silly oversight (not updating the 'size' after each round of evictions) it keeps throwing away repeatedly until it fails. Fix that here. Should make the store more efficient.
2013-04-26Multi-threaded store SEGV fixes and debug improvements.Robin Watts
Fix race condition in the store. When storing an item, we immediately put it into the hash (thus getting our existence check). We then check and try to free enough space for it in the budget. If we cannot free enough, we remove the item from the hash. The race condition comes if someone else finds it in the hash in the meantime. To fix this, we update all 'finds' of things in the hash to move it to the head of the LRU chain (regardless of whether it was in the chain before or not). We only remove it from the hash in the 'failed-to-fit-in-the-budget' case if it's not in the chain already. Also, we fix a bug in the "failed to fit" removal case where we were failing to realise that the the pos pointer was not valid any more. In the course of tracking this bug down various debug functions were improved. These are committed here too.
2013-04-26Squash 2 const warnings.Robin Watts
Add some more consts's and use void *'s where appropriate.
2013-04-26Add image output for HTML.Robin Watts
JPEGs and PNGs are left unchanged. Any other image gets stored as a PNG and sent as a data URL.
2013-04-26Hint enabling/disabling for devices.Robin Watts
Add configuration functions to control the hints set on a given device. Use this to set whether image data is captured or not in the text extraction process. Also update the display list device to respect the device hints during playback.
2013-04-25Generalise fz_write_png to fz_output_pixmap_to_pngRobin Watts
Extract the core of fz_write_png so that it can work to an fz_output * rather than a FILE *. fz_write_png continues to work as before, but now we can output to buffer to.
2013-04-25Add fz_write method for output streams.Robin Watts
2013-04-25Tweak fz_text_page to include image records.Robin Watts
Extract such records as part of the text device.
2013-04-23Fix pkg-config issues.Tor Andersson
Only evaluate pkg-config variables if using system libraries, using a := assignment in Makethird. This silences warnings if the library is in thirdparty but not installed on the system.
2013-04-22Fix various multi-threading problems with the store.Robin Watts
When resizing the hash table, we have a special case to cope with someone else resizing the table before we get a chance to. In this rare situation we were unlocking (regardless of whether we should have been), and failing to relock. Fixed here. When storing an item, I recently changed the code to put the new item into the hash before ensuring that we had enough space. This change was motivated by us wanting not to evict to make room only to find that we didn't need the room as there was a duplicate entry anyway. In so doing, this opened up a potential race condition where another thread could 'find' the item from the hash before it had been filled out. To solve this, we move the "filling out" of the item entries earlier in the function. Another problem is found due to the same block of code; as soon as a new item is put into the hash, it can be found elsewhere. Any attempt to manipulate it's linked list will fail. We therefore set all new items with their prev/next pointers pointing to themselves, enabling us to spot this special case and avoid corrupting the linked list.