Age | Commit message (Collapse) | Author |
|
|
|
|
|
Previously this triggered an assertion in the cleanup code when
freeing the partially opened document.
|
|
Avoid the C++ code complaining about casting string literals
to non-const char *'s.
|
|
|
|
Conflicts:
Makefile
apps/mudraw.c
pdf/pdf_write.c
win32/libmupdf-v8.vcproj
|
|
Previously fix 13943b92f10796efb175e769afe5b0aea85d879a introduced
continued rendering of further pages for documents where one page
failed to load. However, if the entire page tree was missing from a
PDF document then no display list would be obtained, yet MuPDF tried
to render the display list causing a null pointer dereference. Now,
check for a valid display list before trying to render it.
|
|
|
|
|
|
pdf_write_document() may throw an exception and this was uncaught up
until now.
|
|
|
|
|
|
|
|
Conflicts:
pdf/mupdf-internal.h
pdf/pdf_font.c
|
|
|
|
|
|
|
|
Generate example data appropriate to the type of field.
|
|
|
|
Now reusing the internal representation of an annotation for widgets
to avoid two separate lists
|
|
|
|
|
|
Instead of using macros for min/max/abs/clamp, we move to using
inline functions. These are more typesafe, and should produce
equivalent code on compilers that support inline (i.e. pretty much
everything we care about these days).
People can always do their own macro versions if they prefer.
|
|
for(i = 0; i < pdf_array_len(x); i++)
...
results in lots of calls to pdf_array_len. This is not what we want.
|
|
|
|
The cluster needs mujstest to output ppms instead of pngs, so
steal a bit of code from mudraw.
|
|
A problem in the match routine (that didn't show up under windows
due to line endings) meant that screenshots had no effect.
|
|
|
|
The About box was resized on master, and this change was lost
during an earlier merge.
|
|
Mudraw is updated so when the -j flag is used it guesses the length
of the text it should output for each field. It also outputs a
"Lorem Ipsum" string, which should hopefully test the layout
facilities a bit better.
Mujstest is updated so it can read the escaped chars from that
string.
|
|
"verbose" seems to be a reserved word.
Various unused vars, and warnings that didn't show up on windows.
|
|
|
|
|
|
Rather than having a dedicated call to enumerate the rectangles for the
annotations on a page, add an interface for enumerating annotations
with accessor functions. Currently the only accessor function is
the one to get the annotation rectangle.
Use this new scheme in place of fz_bound_annots within mudraw.
Also use this scheme to set the caret cursor in the viewer when over
a data field.
|
|
This is initialised to rgb or bgr according to whether _WIN32 is set
as has always been the case. This allows apps that want to override
it (such as mujstest) to do so though.
|
|
When clicking on a form field, especially with breakpoints in play,
it is possible for the up/down click logic to get confused.
Improve it by using a flag to avoid processing a down click twice.
|
|
When encountering top bit set chars in script files, behave well.
|
|
The -v flag tells mujstest to echo the lines read from the script file
as it runs (useful to see at what point things crash).
The -p flag gives a prefix to apply to the paths from in the script
file.
|
|
|
|
We add a new fz_bound_annots function (and associated pdf_bound_annots
function) that calls a given callback with the page rectangle of the
annotations on a given page. This is marked as being a 'temporary'
function, so we can remove it/change it in future if required. It
seems likely that we'll want to have some sort of 'iterate over
annotations' function eventually, and this does the job for now.
Add a -j flag to mudraw that outputs a simple mujstest script.
For each page with annotations, the script jumps to that page, then
for each annotation on the page, it sets some text to be entered,
and clicks the annotation. In the case of text fields, this will cause
the text to be entered into that text field; in the case of buttons
it will execute the button.
At the end of each page with annotations, the script is told to
snapshot the page.
These test scripts are not designed to be full tests, but they do
at least provide an easy way for us to generate scripts where
every field in our test suite is interacted with.
|
|
Simple command line tool made from cutting all the windows specifics
out of win_main.c and adding a simple script handler in.
Read lines from the script, and feed those events to pdfapp. Screenshot
pages as required.
|
|
This is important, otherwise we can get into an unexpected state and
subsequent mouse moves appear as pans.
|
|
|
|
Conflicts:
fitz/fitz-internal.h
fitz/stm_buffer.c
pdf/mupdf-internal.h
|
|
Harmless, since the context wasn't used, but confusing.
|
|
|
|
Make mudraw pass a cookie in to the rendering procedures. If any errors
are reported for any page, remember this, and set the return code to 1
on exit.
|
|
The file supplied with the bug contains corrupt jpeg data on page
61. This causes an error to be thrown which results in mudraw
exiting.
Previously, when image decode was done at loading time, the error
would have been thrown under the pdf interpreter rather than under
the display list renderer. This error would have been caught, a
warning given, and the program would have continued. This is not
ideal behaviour, as there is no way for a caller to know that there
was a problem, and that the image is potentially incomplete.
The solution adopted here, solves both these problems. The fz_cookie
structure is expanded to include a 'errors' count. Whenever we meet
an error during rendering, we increment the 'errors' count, and
continue.
This enables applications to spot the errors count being non-zero on
exit and to display a warning.
mupdf is updated here to pass a cookie in and to check the error count
at the end; if it is found to be non zero, then a warning is given (just
once per visit to each page) to say that the page may have errors on it.
|
|
|
|
Conflicts:
fitz/doc_document.c
fitz/fitz-internal.h
fitz/fitz.h
fitz/stm_buffer.c
pdf/mupdf-internal.h
pdf/pdf_object.c
pdf/pdf_xobject.c
pdf/pdf_xref.c
win32/mupdf.sln
|