[gs-cvs] rev 8359 - trunk/gs/src
ken at ghostscript.com
ken at ghostscript.com
Mon Nov 12 00:59:36 PST 2007
Author: ken
Date: 2007-11-12 00:59:35 -0800 (Mon, 12 Nov 2007)
New Revision: 8359
Modified:
trunk/gs/src/gdevpdfm.c
Log:
Fix (pdfwrite): named objects, created via a pdfmark such as /BP,
could not have their content modified after the object was completed.
DETAILS:
Bug #689104 "Overwriting transformation /Matrix in XObject previously
created with /BP & /EP pdfmarks".
Some pdfmarks, such as /BP create named objects. These can accumulate
information until a matching pdfmark (/EP in this case) completes the
object. When complete, objects were written to the final destination
PDF file. This made it impossible to later modify the object.
(gdevpfm.c) pdfmark_bind_named_object, change the call to
pdf_substitute_resource to defer writing the object to the
destination file, if the object is named. This means the object is still
available for modification until the end of the job. NB if the object
is not named, we still write it immediately, as there is no mechanism
for modifying an unnamed object, nor do we currently have a mechanism
for maintaining a record of unnamed objects.
EXPECTED DIFFERENCES:
None.
Modified: trunk/gs/src/gdevpdfm.c
===================================================================
--- trunk/gs/src/gdevpdfm.c 2007-11-10 17:20:49 UTC (rev 8358)
+++ trunk/gs/src/gdevpdfm.c 2007-11-12 08:59:35 UTC (rev 8359)
@@ -368,7 +368,10 @@
}
}
if ((*pres)->object->id == -1) {
- code = pdf_substitute_resource(pdev, pres, resourceXObject, NULL, true);
+ if(objname != NULL && objname->size)
+ code = pdf_substitute_resource(pdev, pres, resourceXObject, NULL, false);
+ else
+ code = pdf_substitute_resource(pdev, pres, resourceXObject, NULL, true);
if (code < 0)
return code;
} else {
More information about the gs-cvs
mailing list