summaryrefslogtreecommitdiff
path: root/Resource
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2023-03-18 10:45:00 +0000
committerKen Sharp <ken.sharp@artifex.com>2023-03-18 10:46:10 +0000
commit3abb368c6262e657402ea5ae01e6d91217427e0e (patch)
treee38b0c36312b07b19a2b36b4aed852171a63eeed /Resource
parent5c2e7698fa7e3ef97e41290548ec860a4c0ab46d (diff)
downloadghostpdl-3abb368c6262e657402ea5ae01e6d91217427e0e.tar.gz
ps2write - prevent PSPageOptions wrapping
As requested by customer 1120. The PSPageOptions array is used to specify strings to be inserted into the PostScript output of the ps2write device; the intention is to permit device-specific code to be placed on each page. Ordinarily the array contains one string for each page of the output, and that string is applied individiually. To assist in the common cases where a pattern of different setup is applied to pages, such as treating each of a pair of pages differently, for every pair of pages, the processing 'wraps around' the array if there are more pages than strings. So if we supply two strings the first string will be applied to pages 1, 3, 5, ... and the second string will be applied to page 2, 4, 6, .... The customer wants to disable the 'wrap around' so that if they supply fewer strings than pages, the device simply stops adding strings when it runs out of content in the array. There is no practical way to do this by altering the array content because it is actually quite awkward to deal with heterogeneous parameter arrays. Rather than rewrite the code extensively I've chosen (reluctantly) to add a new parameter 'PSPageOptionsWrap'. When true (the default value) then the behaviour is unchanged. When false the ps2write device no longer wraps around the array, but simply stops adding content to each page.
Diffstat (limited to 'Resource')
-rw-r--r--Resource/Init/gs_pdfwr.ps2
1 files changed, 2 insertions, 0 deletions
diff --git a/Resource/Init/gs_pdfwr.ps b/Resource/Init/gs_pdfwr.ps
index a04d9e350..1ff4c9ced 100644
--- a/Resource/Init/gs_pdfwr.ps
+++ b/Resource/Init/gs_pdfwr.ps
@@ -103,6 +103,7 @@ languagelevel 2 .setlanguagelevel
/UsePrologue //false
/PassThroughJPEGImages //true
/PassThroughJPXImages //true
+ /PSPageOptionsWrap //true
.dicttomark readonly def
/.distillersettings mark
@@ -847,6 +848,7 @@ currentdict /.pdf_hook_DSC_Creator undef
/PassThroughJPXImages { }
/PSDocOptions { }
/PSPageOptions { }
+ /PSPageOptionsWrap { }
/AlwaysOutline { }
/NeverOutline { }
.dicttomark readonly def