[gs-commits] rev 11835 - trunk/gs/base
ken at ghostscript.com
ken at ghostscript.com
Thu Oct 21 11:17:31 UTC 2010
Author: ken
Date: 2010-10-21 11:17:31 +0000 (Thu, 21 Oct 2010)
New Revision: 11835
Modified:
trunk/gs/base/gdevpdf.c
Log:
When producing DSC compliant PostScript from ps2write, do not emit the following;
Pages tree, outlines, articles, named destinations, PageLabels array, document metadata,
document Catalog, threads, encrypt dictionary, xref, trailer.
These objects are not required by PostScript, and cannot be easily
placed in a DSC-conforming file. This does mean that, unlike the general output from
ps2write, the output file is *not* a valid PDF file and cannot be opened as such by a
PDF consumer.
No differences expected.
Modified: trunk/gs/base/gdevpdf.c
===================================================================
--- trunk/gs/base/gdevpdf.c 2010-10-21 11:07:40 UTC (rev 11834)
+++ trunk/gs/base/gdevpdf.c 2010-10-21 11:17:31 UTC (rev 11835)
@@ -1196,7 +1196,7 @@
code = code1;
/* Create the Pages tree. */
-
+ if (!(pdev->ForOPDFRead && pdev->ProduceDSC)) {
pdf_open_obj(pdev, Pages_id);
s = pdev->strm;
stream_puts(s, "<< /Type /Pages /Kids [\n");
@@ -1325,7 +1325,7 @@
if (pdev->pages[i].Page)
pdev->pages[i].Page->id = 0;
}
-
+}
/*
* Write the definitions of the named objects.
* Note that this includes Form XObjects created by BP/EP, named PS
@@ -1350,6 +1350,7 @@
pdf_copy_data(s, rfile, res_end, NULL);
}
+ if (!(pdev->ForOPDFRead && pdev->ProduceDSC)) {
/* Write Encrypt. */
if (pdev->OwnerPassword.size > 0) {
Encrypt_id = pdf_obj_ref(pdev);
@@ -1408,6 +1409,7 @@
}
stream_puts(s, ">>\n");
pprintld1(s, "startxref\n%ld\n%%%%EOF\n", xref);
+ }
/* Release the resource records. */
More information about the gs-commits
mailing list