Age | Commit message (Collapse) | Author |
|
|
|
These got broken during the fz_rect/fz_matrix pass-by-value
changes.
|
|
|
|
Failure within this function could lead to segfaults in drop_signer. The
problem was early allocation of the signer struct without setting its
drop method, so that on error signer was non-null, but not in a state
where drop_signer could be called.
|
|
When a document is signed multiple times, an incremental update is needed
for each, the multiple updates sometimes written to the file as a single
saving operation. Within pdf_sign_signature it is the call to
pdf_signature_set_value that marks the current section of the xref to which
changes are recorded as "full", so that subsequent changes will trigger the
creation of a new section. Within pdf_sign_signature we were creating the
signature's appearance stream after the call to pdf_signature_set_value and
hence triggering an extra unnecessary setction. This commit moves the
pdf_signature_set_value to after the creation of the appearance stream, so
that we need only as many new xref sections as there are signings.
|
|
The pdf_update_signature_appearance function must be called directly by
the signing code when it signs the document; as only the signing code has
all the text that needs to be written into the appearance.
|
|
Create a matrix that transforms a page with resolution and rotation,
and grid fits the resulting bounding box.
|
|
|
|
|
|
|
|
|
|
Several things irk me about passing values as const pointers:
* They can be NULL, which is not a valid value.
* They require explicit temporary variables for storage.
* They don't compose easily in a legible manner, requiring
weird pointer passing semantics where the variable being assigned
is hidden as an argument in the innermost function call.
* We can't change the value through the pointer, requiring yet more
local variables to hold copies of the input value.
In the device interface where we pass a matrix to a function, we often
find ourselves making a local copy of the matrix so we can concatenate
other transforms to it. This copying is a lot of unnecessary busywork
that I hope to eventually avoid by laying the groundwork with this
commit.
This is a rather large API change, so I apologize for the inconvenience,
but I hope the end result and gain in legibility will be worth the pain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Trigger correctly on AS state changes.
* Handle the case when there is no AP (such as for unchecked checkboxes):
- Don't try to create Widget/Btn streams.
- Don't flag/unflag when AP synthesis throws.
|
|
|
|
|
|
Updates the input point coordinates, and also returns a quad with
appropriate UI handles.
|
|
Since the function no longer returns ownership of the string, use the
common naming convention.
|
|
|
|
Previously we would have tripped over this, thrown an error
and aborted loading the whole page. Any non-stream, non "Identity"
CIDToGIDMaps now produce a warning rather than an error so we don't
stop processing the entire page.
|
|
The Dingbats and Symbol fonts have not been changed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Removes the need to alloc/free text strings in the API, allowing
for simple functions like pdf_dict_get_text_string.
|
|
|
|
|
|
|
|
|
|
The number 0 is a valid percentage number.
|
|
|
|
Format single-line Widget/Tx fields vertically centered.
|
|
|
|
|
|
We do not support rich text content; remove the properties rather than
leave them untouched and out of sync with the simple contents and styles.
|
|
|
|
|
|
Now handles more annotation types, and does not use the pdf-write device.
Handles many of the usual annotation properties, such as border width,
color, interior color, line ending styles.
* Ink
* Highlight, Underline, Strike-Out, Squiggly
* Line (with arrow-heads)
* Polygon
* PolyLine
* Square
* Circle
* Caret
* Text (needs better icons)
* FileAttachment (needs better icons)
* Sound (needs better icons)
* Stamp
* FreeText
Partially complete:
* Widget (treats everything like a plain text field)
Not done, but on the to-do list:
* /BS style (solid/dashed/bevel/inset/underline)
* /BS dash pattern
Not done and not on the list:
* Movie
* Screen
* Printer's Mark
* Trap Network
* Watermark
* /Border corner radii (ignored by acrobat)
* /BE cloudy border effect
|
|
|
|
Do not cache PDF fonts, since they have custom metrics and encodings that
cannot be shared. This is primarily to speed up font loading for EPUB, PDF
appearance synthesis, and any other uses of default metrics and unicode
encoded fonts.
|