Age | Commit message (Collapse) | Author |
|
|
|
file activated.
Also fixed a few issues for when we open a new file and close the
current contents. There was an issue with the displaylist cache
clean up.
|
|
In preparation for work on progressive loading, update the exception
handling scheme slightly.
Until now, exceptions (as thrown with fz_throw, and caught with
fz_try/fz_catch) have merely had an informative string. They have
never had anything that can be compared to see if an error is of
a particular type.
We now introduce error codes; when we fz_throw, we now always
give an error code, and can optionally (using fz_throw_message)
give both an error code and an informative string.
When we fz_rethrow from within a fz_catch, both the error code and
the error message is maintained. Using fz_rethrow_message we can
'improve' the error message, but the code is maintained.
The error message can be read out using fz_caught_message() and the
error code can be read as fz_caught().
Currently we only define a 'generic' error. This will expand in future
versions to include other error types that may be tested for.
|
|
Also correct a comment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Patch from "andyhan2000" to make the ink annotations smoother.
|
|
|
|
Tested with msysgit 1.8.3 environment.
|
|
|
|
Just before pushing the previous commit of Michaels, I removed
an fz_var, thinking it wasn't required. After discussing it with
him I realise that it was needed, so reintroduce it here with
another error handling tweak. Apologies!
|
|
|
|
Also rework of some UI interactions to avoid zooming, text search, etc when
in a specialized view like contents or reflow (webview)
|
|
The display list rendering is used when scaling within the current page to
enable quicker response.
|
|
Thanks to zeniko for spotting these.
|
|
Spotted by Vincent Torri. Many thanks!
|
|
Remove fz_free_display_list from the API; instead use fz_drop_display_list.
|
|
In some cases, the existing code can leave the GLYPHCACHE lock held
if an error occurs during type3 rendering. Correct this oversight.
Thanks to zeniko for spotting the bug and providing a fix.
|
|
When creating the previous commit, I considered an alternative way
of working. While we didn't use this in the end, I forgot to remove
it from the code before committing. Stripping it out here. Sorry.
|
|
Spot a 'startxref' of 0 as being an error; otherwise the code
falls through and we SEGV.
Also update the pdf_repair_obj function to cope better with the new
way we parse ints. Previously we parsed ints into the buffer and
atoi'd them there - to step backwards over the int was therefore a
matter of stepping backwards over the specified number of chars.
In the 'new' code (now quite old) we parse ints directly, hence we
cannot do this stepping back. Also, stepping backwards by more than
1 byte is risky anyway. We therefore adopt a smarter approach of
returning the next lexed token from pdf_repair_obj.
Thanks to zeniko for reporting these problems and providing a test
file.
|
|
|
|
It seems that the code for begin_tile currently assumes that area
is passed in untransformed. Maybe this is something we should
look at, but for now commit it to revert the rendering problems.
|
|
|
|
|
|
|
|
|
|
|
|
Mono only for now. Copy the appropriate fz_pcl_options for the printer required
and pass that to fz_write_pcl_bitmap.
Add pcl output to mudraw - .pcl produces laserjet 4 compatible pcl.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fz_new_image_from_buffer was building a new buffer from the data in
the supplied buffer, rather than just using the supplied buffer. Also
move the code into line with our standards; don't pass ownership of
the buffer.
|
|
Also on first alteration create a further section to hold the updates. This
is in preparation for supporting incemental update.
|
|
Now directly read the sections handling trailers as we go, rather than
processing the most-recent trailer up front. Handle XRefStm separately
from the main section-loading loop so as to ignore Prev when it occurs
in a XRefStm (as specified in the spec). That has the side-effect of
avoiding recursion.
|
|
file fails to open.
Removal of null checks for object freeing in interface to mupdf.
|
|
Currently, dev_bbox creates a union of all bounding boxes of paths,
text and images. If any of these are however clipped away or inside
a tile, they should be ignored.
|
|
* pdfapp_save in pdfapp.c contains unreachable code (and could be
simplified by inverting most of the checked conditions)
* RegSetValueExA expects a const BYTE pointer instead of a char
pointer (warns about signedness mismatch)
* same for SendMessageA where -1 is signed even though WPARAM isn't
Also, there's no need to include mupdf.h, muxps.h, etc. at the top of
applications which only use the fz_* API (fitz.h comes included with
pdfapp.h).
|
|
fz_free_device usually doesn't throw (throwing in clean-up code is
quite pointless anyway) but freeing the text extraction device might
do so under memory pressure. This patch catches any potential
exception to guarantee a proper clean-up.
|