[gs-cvs] gs/src

Ray Johnston ray at ghostscript.com
Wed Dec 14 23:54:32 PST 2005


Update of /cvs/ghostscript/gs/src
In directory casper2:/tmp/cvs-serv31786/src

Modified Files:
	gdevpdfm.c 
Log Message:
Continuation of previous patch for another branch to handle the /URI key
in a pdfmark, moving it into the /A (Action) dict with /S key value /URI.
Bug 688414 for customer 515.


Index: gdevpdfm.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gdevpdfm.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- gdevpdfm.c	5 Dec 2005 19:14:22 -0000	1.52
+++ gdevpdfm.c	15 Dec 2005 07:54:30 -0000	1.53
@@ -572,7 +572,7 @@
 	const byte *astr = Action[1].data;
 	const uint asize = Action[1].size;
 
-	if ((File != 0 || Dest.data != 0) &&
+	if ((File != 0 || Dest.data != 0 || URI != 0) &&
 	    (pdf_key_eq(Action + 1, "/Launch") ||
 	     (pdf_key_eq(Action + 1, "/GoToR") && File) ||
 	     pdf_key_eq(Action + 1, "/Article"))
@@ -602,6 +602,12 @@
 		pdfmark_put_c_pair(adict, "/F", File + 1);
 		File = 0;	/* so we don't write it again */
 	    }
+	    if (URI) {
+		/* Adobe Distiller puts a /URI key from pdfmark into the */
+		/* Action dict with /S /URI as Subtype */
+		pdfmark_put_pair(adict, URI);
+		cos_dict_put_c_strings(adict, "/S", "/URI");
+	    }
 	    cos_dict_put(pcd, (const byte *)"/A", 2,
 			 COS_OBJECT_VALUE(&avalue, adict));
 	} else if (asize >= 4 && !memcmp(astr, "<<", 2)) {



More information about the gs-cvs mailing list