From 0338f00e07c5ae1f1c67b78db6454100c839db3c Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 15 Mar 2012 14:02:54 +0000 Subject: 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. --- pdf/pdf_annot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pdf') 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")) -- cgit v1.2.3