summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-03-15 14:02:54 +0000
committerRobin Watts <robin.watts@artifex.com>2012-03-15 14:02:54 +0000
commit0338f00e07c5ae1f1c67b78db6454100c839db3c (patch)
treea76f612b9ed5e3aae3d36aa0595de1a7d75004d8 /pdf
parentfce5f51eb523e48eb2beca54690af75a726f6d0a (diff)
downloadmupdf-0338f00e07c5ae1f1c67b78db6454100c839db3c.tar.xz
Bug 692874: Fix Launch annotations.
Looks like my launch annotation code was incorrect, hence giving the empty string for all FZ_LINK_LAUNCH types; fixed here.
Diffstat (limited to 'pdf')
-rw-r--r--pdf/pdf_annot.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c
index 28300c9b..3864c62e 100644
--- a/pdf/pdf_annot.c
+++ b/pdf/pdf_annot.c
@@ -217,8 +217,11 @@ pdf_parse_action(pdf_document *xref, pdf_obj *action)
}
else if (!strcmp(pdf_to_name(obj), "Launch"))
{
+ dest = pdf_dict_gets(action, "F");
ld.kind = FZ_LINK_LAUNCH;
- ld.ld.launch.file_spec = pdf_to_utf8(ctx, pdf_dict_gets(action, "F"));
+ if (pdf_is_dict(dest))
+ dest = pdf_dict_gets(dest, "F");
+ ld.ld.launch.file_spec = pdf_to_utf8(ctx, dest);
ld.ld.launch.new_window = pdf_to_int(pdf_dict_gets(action, "NewWindow"));
}
else if (!strcmp(pdf_to_name(obj), "Named"))