Age | Commit message (Collapse) | Author |
|
We compile with -Wno-unused-parameters instead.
|
|
|
|
Use the flags when selecting a fallback font.
|
|
Also fix a memory leak.
|
|
Spot (broken) values that will require special 'acrobat
compatible' handling and use the old code for that.
|
|
Look up fallback fonts by unicode script, with a flag to select the serif or
sans-serif font style where such variants exist.
Move all builtin fonts into fitz namespace.
|
|
It's an opaque immutable structure, that we don't expect to ever want
to change after creation. Therefore the const keyword is not useful,
and is only line noise.
|
|
The font is an immutable opaque structure, no need to add the const
keyword since users aren't expected or expecting to change it.
|
|
|
|
"0.00-70" should be parsed as one token, not two tokens as we did.
|
|
In general, we should use 'const fz_blah' in device calls whenever
the callee should not alter the fz_blah.
Push this through. This shows up various places where we fz_keep
and fz_drop these const things.
I've updated the fz_keep and fz_drops with appropriate casts
to remove the consts. We may need to do the union dance to avoid
the consts for some compilers, but will only do that if required.
I think this is nicer overall, even allowing for the const<->no const
problems.
|
|
|
|
|
|
Keeps operations in the int domain as long as possible,
and only resorts to floats if required.
|
|
|
|
js_pcall was leaving crap on the stack in case of errors.
AFSimple_Calculate needs access to the doc object, but cannot use the
usual 'this' binding since it's a function. Add a global reference to
the doc object MuPDF_Doc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In preparation of adding pdf_write_document that writes a document
to a fz_output stream.
|
|
|
|
Separate naming of functions that save complete files to disk
from functions that write data to streams.
|
|
We can now group all clipped text into one fz_text object and simplify
the device interface.
|
|
|
|
Use fz_output in debug printing functions.
Use fz_output in pdfshow.
Use fz_output in fz_trace_device instead of stdout.
Use fz_output in pdf-write.c.
Rename fz_new_output_to_filename to fz_new_output_with_path.
Add seek and tell to fz_output.
Remove unused functions like fz_fprintf.
Fix typo in pdf_print_obj.
|
|
See Bug 696284. Do not set disallow_new_increments in pdf_create_document, as
this breaks following calls to pdf_sign_signature.
See also the comments in bug 696251.
|
|
|
|
|
|
|
|
arrays
The list box and combo box can have values that are 2-element arrays. The first element
is the "export" value and the second element is the value that should be shown
in the list box UI. This fix ensures that we get the proper value to show in the UI.
Also, it adds the option to get the export values. These are needed if you wish to
update the field dictionary's V (value) entry, which is the currently selected values(s).
This fix works well with gsview. The other viewers will now display the proper content
in their UI, (unlike before this fix) but may need a bit more work to ensure that the
proper V (value) is updated with changes in the selections. In addition, we add
selection rectangles to the selected list box items.
|
|
When writing incremental xref streams, the opts->use_list entry of the last
object, i.e. of the xref stream object itself, was left uninitialized. This
resulted in a random value, 0 or 1, being written into the xref stream.
Also, always write a newline before the endstream keyword, as that shall be
done for xref streams and should be done for all other streams.
|
|
In pdf_create_document set disallow_new_increments to 1. Without this, the
calls to pdf_new_ref in pdf_create_document create an incremental xref
section. The following call to pdf_set_populating_xref_trailer then does not
set the trailer of the final xref section.
|
|
|
|
|
|
|
|
Respect default widths when creating the glyph width table.
|
|
When lexing a number, do NOT check for overflow. This causes
loss of data in some files. The current implementation matches
Acrobat.
When lexing a startxref offset, check for overflow. If found, throw
an error.
|
|
The PDF spec says that old format xrefs should start with:
xref\n<start> <len>
The example file in question has:
xref <start> <len>
which confuses our parsing code. Update the parse code to avoid
using fz_read_line, and to instead work on a char level.
Also, downgrade the error given when the first object is not free
to be a warning. Now we do 'just in time' repair, we are probably
better able to cope.
|
|
|
|
The current code never looks for /Root objects in dictionaries
as it parses them. This means that 'New style' files end up
without any Roots after repair.
The new code therefore updates pdf_repair_obj to look for Root
objects in the same way it looks for encrypt and id objects.
These go into the list of found roots.
The Root object almost certainly has indirections within it, so
it is vital that the 'doc' pointer gets set. This means we have
to make a slight adjustment to pdf_repair_obj so that the dict
is parsed with a doc pointer. In turn this means we need to
manually ensure that none of the other information read from
the dict during the repair operation will cause indirections
to be resolved. This is achieved by checking for
!pdf_is_indirect at various points.
|
|
sizeof(16) is not 16 :)
Thanks to David Binderman for pointing this out.
|
|
Take on 2 patches from Zeniko to solve problems with the latest
version of PDF encryption.
Many thanks.
|
|
|
|
|
|
This fixes bug #696123 by allowing multiple signatures each to be written
to the document in a separate incemental update.
Add count num_incremental_sections to keep track of the number of
incremental sections.
Add xref_base, which can be set between 0 and num_incremental_sections
inclusive to access different versions of the document.
Add disallow_new_increments flag that stops new incremental sections
being provoked by the creation of an xref stream.
Move the unsaved_sigs list from the document structure to the xref
structure. With this commit in place, the lists will never grow beyond
length one, but we've maintained the list structure in case other cases
need supporting in the future.
Add an end offset field to the xref structure, so that during completion
of signatures the document length of the various incremental versions of
the document are available.
Factor out functions for storing unsaved signatures and for checking if
an object is an unsaved signature.
Do deep copy of objects that require the holding of several versions.
|
|
This is work towards supporting several levels of incremental xref,
which in turn is work towards bug #696123. When several levels are
present, the operation will make a copy of the object and that needs
to be done before any change to the object.
|
|
This is work towards bug #696123
|