summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-signature.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-03-15 22:42:15 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-06-22 17:05:04 +0200
commit8fc19912a4898ca6993a2acf92116e621d140f7a (patch)
tree5f85f35767de47bcd7b7a3e32ce4fb867f7735db /source/pdf/pdf-signature.c
parent7d2407571d8c8851b67af5ddd0429467c7048b16 (diff)
downloadmupdf-8fc19912a4898ca6993a2acf92116e621d140f7a.tar.xz
Create appearance streams for annotations.
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
Diffstat (limited to 'source/pdf/pdf-signature.c')
-rw-r--r--source/pdf/pdf-signature.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/pdf/pdf-signature.c b/source/pdf/pdf-signature.c
index ca06fa56..6ccb7ab2 100644
--- a/source/pdf/pdf-signature.c
+++ b/source/pdf/pdf-signature.c
@@ -72,6 +72,7 @@ void pdf_sign_signature(fz_context *ctx, pdf_document *doc, pdf_widget *widget,
pdf_signature_set_value(ctx, doc, wobj, signer);
pdf_to_rect(ctx, pdf_dict_get(ctx, wobj, PDF_NAME(Rect)), &rect);
+
/* Create an appearance stream only if the signature is intended to be visible */
if (!fz_is_empty_rect(&rect))
{
@@ -95,7 +96,7 @@ void pdf_sign_signature(fz_context *ctx, pdf_document *doc, pdf_widget *widget,
fz_append_printf(ctx, fzbuf, ", c=%s", dn->c);
dn_str = fz_string_from_buffer(ctx, fzbuf);
- pdf_set_signature_appearance(ctx, doc, (pdf_annot *)widget, dn->cn, dn_str, NULL);
+ pdf_update_signature_appearance(ctx, (pdf_annot *)widget, dn->cn, dn_str, NULL);
}
}
fz_always(ctx)