6 Replies Latest reply: Jun 17, 2011 11:40 AM by eodgers RSS

    Postscript coding to add a blank back pg to files with an odd number of pgs

    eodgers Community Member

      Hi all,

       

      I need the coding to add a blank final page to ps docs with an odd number of pages, if this is even possible.  I am appending these files to a large file that is printed double-sided.  If there are not blanks inserted for the docs with an odd number of pages, then when appended, the first page of the next doc is printing on the back of the last page.  Any ideas?

       

      Thanks!

        • 1. Re: Postscript coding to add a blank back pg to files with an odd number of pgs
          abeddie Community Member

          There are many ways to break this such as redefine the EndPage procedure or not getting to the end of a file

          but here is a start:

           

          % beginning of job/ProLog/Setup

          /PageCount 0 def
          <<
            /EndPage {pop pop /PageCount PageCount 1 add def (Page= ) print PageCount = true}
          >> setpagedevice

           

          % after job

          PageCount 2 mod 0 eq {(No Page Needed) = } { (ADD PAGE) = showpage }ifelse

          • 2. Re: Postscript coding to add a blank back pg to files with an odd number of pgs
            eodgers Community Member

            Thanks for the response!  For the %after job portion, am I adding that right before the %%EOF?  If not, where?

            • 3. Re: Postscript coding to add a blank back pg to files with an odd number of pgs
              Mr. Horton Community Member

              IF you can count on all of your PostScript files incorporating DSC (Document Structuring Conventions) AND they have the "%%Pages: ..." comment with the actual page count AND they are not printing "n-up" or muliple copies, THEN you could scan and parse the pages comment and append a showpage to the end when the page count is an odd number. You should alter the pages comment to reflect the new page count as well, if it is going to be reused in the page appended version. (The qualification of no "n-up" printing and no multiple copies could be overcome by scanning for and parsing them as well.)

              This method could be done with a multitude of programming languages or scripts and wouldn't be broken by a redefinition of a procedure in the original PostScript files.

              • 4. Re: Postscript coding to add a blank back pg to files with an odd number of pgs
                eodgers Community Member

                Hello and thanks very much for your response!  Because of the large volume of docs I need to do this with, I need to try achieve this by doing a data conversion... see one string and replace with another, using Solimar Print Director's data conversion module.  So, I need to be able to key on a string and replace with a different string.  Not sure if this is even possible without having an infinitely long string.  The kicker is that it needs to work for not only a 1 page doc, but also 3, 5, 7 etc.  If the strings are not too long I would write a conversion string for each particular page numbering case.  Here is a one page sample file that needs a back page added.

                 

                 

                %!PS-Adobe-3.0

                %%Title: Microsoft Word - SEPARATE 0100.dot

                %%Creator: PScript5.dll Version 5.2.2

                %%CreationDate: 6/1/2011 20:8:49

                %%For: mobiususr

                %%BoundingBox: (atend)

                %%Pages: (atend)

                %%Orientation: Portrait

                %%PageOrder: Special

                %%DocumentNeededResources: (atend)

                %%DocumentSuppliedResources: (atend)

                %%DocumentData: Clean7Bit

                %%TargetDevice: (Jaws) (3010) 1

                %%LanguageLevel: 2

                %%EndComments

                 

                %%BeginDefaults

                %%PageBoundingBox: 2 2 610 790

                %%ViewingOrientation: 1 0 0 1

                %%EndDefaults

                 

                 

                %%BeginProlog

                %%BeginResource: file Pscript_WinNT_ErrorHandler 5.0 0

                /currentpacking where{pop/oldpack currentpacking def/setpacking where{pop false

                setpacking}if}if/$brkpage 64 dict def $brkpage begin/prnt{dup type/stringtype

                ne{=string cvs}if dup length 6 mul/tx exch def/ty 10 def currentpoint/toy exch

                def/tox exch def 1 setgray newpath tox toy 2 sub moveto 0 ty rlineto tx 0

                rlineto 0 ty neg rlineto closepath fill tox toy moveto 0 setgray show}bind def

                /nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def/=={/cp 0 def

                typeprint nl}def/typeprint{dup type exec}readonly def/lmargin 72 def/rmargin 72

                def/tprint{dup length cp add rmargin gt{nl/cp 0 def}if dup length cp add/cp

                exch def prnt}readonly def/cvsprint{=string cvs tprint( )tprint}readonly def

                /integertypereadonly def/realtypereadonly def/booleantype

                readonly def/operatortype{()tprint =string cvs tprint( )tprint}

                readonly def/marktype{pop(-mark- )tprint}readonly def/dicttype{pop

                (-dictionary- )tprint}readonly def/nulltype{pop(-null- )tprint}readonly def

                /filetype{pop(-filestream- )tprint}readonly def/savetype{pop(-savelevel- )

                tprint}readonly def/fonttype{pop(-fontid- )tprint}readonly def/nametype{dup

                xcheck not{(/)tprint}if cvsprint}readonly def/stringtype{dup rcheck{(\()tprint

                tprint(\))tprint}{pop(-string- )tprint}ifelse}readonly def/arraytype{dup rcheck

                {dup xcheck{({)tprint{typeprint}forall(})tprint}{()

                tprint}ifelse}{pop(-array- )tprint}ifelse}readonly def/packedarraytype{dup

                rcheck{dup xcheck{({)tprint{typeprint}forall(})tprint}{([)tprint{typeprint}

                forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse}readonly def/courier

                /Courier findfont 10 scalefont def end errordict/handleerror{systemdict begin

                $error begin $brkpage begin newerror{/newerror false store vmstatus pop pop 0

                ne{grestoreall}if errorname(VMerror)neif initgraphics courier setfont

                lmargin 720 moveto errorname(VMerror)eq{userdict/ehsave known{clear userdict

                /ehsave get restore 2 vmreclaim}if vmstatus exch pop exch pop PrtVMMsg}{

                (ERROR: )prnt errorname prnt nl(OFFENDING COMMAND: )prnt/command load prnt

                $error/ostack known{nl nl(STACK:)prnt nl nl $error/ostack get aload length{==}

                repeat}if}ifelse systemdict/showpage get exec(%%[ Error: )print errorname

                =print(; OffendingCommand: )print/command load =print( ]%%)= flush}if end end

                end}dup 0 systemdict put dup 4 $brkpage put bind readonly put/currentpacking

                where{pop/setpacking where{pop oldpack setpacking}if}if

                %%EndResource

                userdict /Pscript_WinNT_Incr 230 dict dup begin put

                %%BeginResource: file Pscript_FatalError 5.0 0

                userdict begin/FatalErrorIf{{initgraphics findfont 1 index 0 eq{exch pop}{dup

                length dict begin{1 index/FID ne{def}{pop pop}ifelse}forall/Encoding

                stoppedif def currentdict end /ErrFont-Latin1 exch definefont}ifelse exch scalefont setfont counttomark 3 div cvi{moveto show}repeat showpage quit}ifelse}bind def end %%EndResource userdict begin/PrtVMMsg{vmstatus exch sub exch pop gt{[ (This job requires more memory than is available in this printer.)100 500 (Try one or more of the following, and then print again:)100 485 (For the output format, choose Optimize For Portability.)115 470 (In the Device Settings page, make sure the Available PostScript Memory is accurate.) 115 455(Reduce the number of fonts in the document.)115 440 (Print the document in parts.)115 425 12/Times-Roman showpage (%%[ PrinterError: Low Printer VM ]%%)= true FatalErrorIf}if}bind def end version cvi 2016 ge{/VM?{pop}bind def}{/VM? userdict/PrtVMMsg get def}ifelse 105000 VM? %%BeginResource: file Pscript_Win_Basic 5.0 0 /d/def load def/,/load load d/~/exch , d/?/ifelse , d/!/pop , d/`/begin , d/^ /index , d/@/dup , d/+/translate , d/$/roll , d/U/userdict , d/M/moveto , d/- /rlineto , d/&/currentdict , d/:/gsave , d/;/grestore , d/F/false , d/T/true , d/N/newpath , d/E/end , d/Ac/arc , d/An/arcn , d/A/ashow , d/D/awidthshow , d/C /closepath , d/V/div , d/O/eofill , d/L/fill , d/I/lineto , d/-c/curveto , d/-M /rmoveto , d/+S/scale , d/Ji/setfont , d/Lc/setlinecap , d/Lj/setlinejoin , d /Lw/setlinewidth , d/Lm/setmiterlimit , d/sd/setdash , d/S/show , d/LH/showpage , d/K/stroke , d/W/widthshow , d/R/rotate , d/L2? false/languagelevel where{pop languagelevel 2 ge{pop true}if}if d L2?{/xS/xshow , d/yS/yshow , d/zS/xyshow , d}if/b{bind d}bind d/bd{bind d}bind d/xd{~ d}bd/ld{, d}bd/bn/bind ld/lw/Lw ld /lc/Lc ld/lj/Lj ld/sg/setgray ld/ADO_mxRot null d/self & d/OrgMx matrix currentmatrix d/reinitialize{: OrgMx setmatrix[/TextInit/GraphInit/UtilsInit counttomark{@ where{self eq}?{cvx exec}{!}?}repeat cleartomark ;}b /initialize{`{/Pscript_Win_Data where{!}{U/Pscript_Win_Data & put}?/ADO_mxRot ~ d/TextInitialised? F d reinitialize E}{U/Pscript_Win_Data 230 dict @ ` put /ADO_mxRot ~ d/TextInitialised? F d reinitialize}?}b/terminate{!{& self eq {exit}?}loop E}b/suspend/terminate , d/resume{` Pscript_Win_Data `}b U ` /lucas 21690 d/featurebegin{countdictstack lucas[}b/featurecleanup{stopped {cleartomark @ lucas eq{! exit}if}loop countdictstack ~ sub @ 0 gt{repeat} {!}?}b E/snap{transform 0.25 sub round 0.25 add ~ 0.25 sub round 0.25 add ~ itransform}b/dsnap{dtransform round ~ round ~ idtransform}b/nonzero_round{@ 0.5 ge{round}{@ -0.5 lt{round}{0 ge{1}{-1}?}?}?}b/nonzero_dsnap{dtransform nonzero_round ~ nonzero_round ~ idtransform}b U<04>cvn{}put/rr{1 ^ 0 - 0 ~ - neg 0 - C}b/irp{4 -2 $ + +S fx 4 2 $ M 1 ^ 0 - 0 ~ - neg 0 -}b/rp{4 2 $ M 1 ^ 0 - 0 ~ - neg 0 -}b/solid{[]0 sd}b/g{@ not{U/DefIf_save save put}if U/DefIf_bool 2 ^ put}b/DefIf_El{if U/DefIf_bool get not @{U/DefIf_save get restore}if}b/e {DefIf_El !}b/UDF{L2?{undefinefont}{!}?}b/UDR{L2?{undefineresource}{! !}?}b /freeVM{/Courier findfont[40 0 0 -40 0 0]makefont Ji 2 vmreclaim}b/hfRedefFont {findfont @ length dict `{1 ^/FID ne{d}{! !}?}forall & E @ ` ~{/CharStrings 1 dict `/.notdef 0 d & E d}if/Encoding 256 array 0 1 255{1 ^ ~/.notdef put}for d E definefont !}bind d/hfMkCIDFont{/CIDFont findresource @ length 2 add dict `{1 ^ @/FID eq ~ @/XUID eq ~/UIDBase eq or or{! !}?}forall/CDevProc ~ d/Metrics2 16 dict d/CIDFontName 1 ^ d & E 1 ^ /CIDFont defineresource ![]composefont !} bind d %%EndResource %%BeginResource: file Pscript_Win_Utils_L2 5.0 0 /rf/rectfill , d/fx{1 1 dtransform @ 0 ge{1 sub 0.5}{1 add -0.5}? 3 -1 $ @ 0 ge {1 sub 0.5}{1 add -0.5}? 3 1 $ 4 1 $ idtransform 4 -2 $ idtransform}b/BZ{4 -2 $ snap + +S fx rf}b/rs/rectstroke , d/rc/rectclip , d/UtilsInit{currentglobal{F setglobal}if}b/scol{! setcolor}b/colspA/DeviceGray d/colspABC/DeviceRGB d /colspRefresh{colspABC setcolorspace}b/SetColSpace{colspABC setcolorspace}b /resourcestatus where{!/ColorRendering/ProcSet resourcestatus{! ! T}?}? not{/ColorRendering<</GetHalftoneName{currenthalftone @/HalftoneName known{ /HalftoneName get}{!/none}?}bn/GetPageDeviceName{currentpagedevice @ /PageDeviceName known{/PageDeviceName get @ null eq{!/none}if}{!/none}?}bn /GetSubstituteCRD{!/DefaultColorRendering/ColorRendering resourcestatus{! ! /DefaultColorRendering}{(DefaultColorRendering*){cvn exit}127 string /ColorRendering resourceforall}?}bn>>/defineresource where{!/ProcSet defineresource !}{! !}?}if/buildcrdname{/ColorRendering/ProcSet findresource ` mark GetHalftoneName @ type @/nametype ne ~/stringtype ne and{!/none}if(.) GetPageDeviceName @ type @/nametype ne ~/stringtype ne and{!/none}if(.)5 ^ 0 5 -1 1{^ length add}for string 6 1 $ 5 ^ 5{~ 1 ^ cvs length 1 ^ length 1 ^ sub getinterval}repeat ! cvn 3 1 $ ! ! E}b/definecolorrendering{~ buildcrdname ~ /ColorRendering defineresource !}b/findcolorrendering where{!}{ /findcolorrendering{buildcrdname @/ColorRendering resourcestatus{! ! T}{ /ColorRendering/ProcSet findresource ` GetSubstituteCRD E F}?}b}? /selectcolorrendering{findcolorrendering !/ColorRendering findresource setcolorrendering}b/G2UBegin{findresource/FontInfo get/GlyphNames2Unicode get `}bind d/G2CCBegin{findresource/FontInfo get/GlyphNames2HostCode get `}bind d /G2UEndbind d/AddFontInfoBegin{/FontInfo 8 dict @ `}bind d/AddFontInfo{ /GlyphNames2Unicode 16 dict d/GlyphNames2HostCode 16 dict d}bind d /AddFontInfoEnd{E d}bind d/T0AddCFFMtx2{/CIDFont findresource/Metrics2 get ` d E}bind d %%EndResource end %%EndProlog %%BeginSetup statusdict begin (%%[ ProductName: ) print product print ( ]%%)= flush end false Pscript_WinNT_Incr dup /initialize get exec featurebegin{ %%BeginNonPPDFeature: JobTimeout 0 0 /languagelevel where{pop languagelevel}ifelse 2 ge{1 dict dup/JobTimeout  4 -1 roll put setuserparams}{statusdict/setjobtimeout get exec}ifelse %%EndNonPPDFeature }featurecleanup featurebegin{ %%BeginNonPPDFeature: WaitTimeout 300 300 /languagelevel where{pop languagelevel}ifelse 2 ge{1 dict dup/WaitTimeout 4 -1 roll put setuserparams}{statusdict/waittimeout 3 -1 roll put}ifelse %%EndNonPPDFeature }featurecleanup featurebegin{ %%BeginFeature: *InputSlot Tray4   <</MediaType (PINK)>> setpagedevice %%EndFeature }featurecleanup featurebegin{ %%BeginFeature: *MediaType none %%EndFeature }featurecleanup featurebegin{ %%BeginFeature: *MediaColor none %%EndFeature }featurecleanup featurebegin{ %%BeginFeature: *Duplex None   1 dict dup /Duplex false put setpagedevice   1 dict dup /Tumble false put setpagedevice %%EndFeature }featurecleanup featurebegin{ %%BeginFeature: *SolimarCollate True 1 dict dup /Collate true put setpagedevice %%EndFeature }featurecleanup featurebegin{ %%BeginFeature: *Jog None 1 dict dup /Jog 0 put setpagedevice %%EndFeature }featurecleanup featurebegin{ %%BeginFeature: *StapleWhen None 1 dict dup /Staple 0 put setpagedevice %%EndFeature }featurecleanup featurebegin{ %%BeginFeature: *PageRegion Letter   2 dict dup /PageSize put dup /ImagingBBox null put setpagedevice %%EndFeature }featurecleanup featurebegin{ %%BeginFeature: *Resolution 300dpi 1 dict dup /HWResolution put setpagedevice %%EndFeature }featurecleanup 1 setlinecap 1 setlinejoin /mysetup def %%EndSetup userdict begin /ehsave save def end %%Page: 1 1 %%PageBoundingBox: 2 2 610 790 %%EndPageComments %%BeginPageSetup /DeviceRGB dup setcolorspace /colspABC exch def mysetup concat colspRefresh %%EndPageSetup 0 0 0 1 scol Pscript_WinNT_Incr begin %%BeginResource: file Pscript_Text 5.0 0 /TextInit{TextInitialised? not{/Pscript_Windows_Font & d/TextInitialised? T d /fM[1 0 0 1 0 0]d/mFM matrix d/iMat[1 0 0.212557 1 0 0]d}if}b/copyfont{1 ^ length add dict `{1 ^/FID ne{d}{! !}?}forall & E}b/EncodeDict 11 dict d/bullets {{/bullet}repeat}b/rF{3 copyfont @ ` ~ EncodeDict ~ get/Encoding ~ 3 ^/0 eq{& /CharStrings known{CharStrings/Eth known not{! EncodeDict/ANSIEncodingOld get} if}if}if d E}b/mF{@ 7 1 $ findfont ~{@/Encoding get @ StandardEncoding eq{! T}{ stopped{! F}?{@ ` T 32 1 127{Encoding 1 ^ get

                StandardEncoding 3 -1 $ get eq and}for E}?}?}?{1 ^ ~ rF}{0 copyfont}? 6 -2 $

                ! ! ~ !/pd_charset @ where{~ get 128 eq{@ FDV 2 copy get @ length array copy

                put pd_CoverFCRange}if}{!}? 2 ^ ~ definefont fM 5 4 -1 $ put fM 4 0 put fM

                makefont Pscript_Windows_Font 3 1 $ put}b/sLT{: Lw -M currentpoint snap M 0 - 0

                Lc K ;}b/xUP null d/yUP null d/uW null d/xSP null d/ySP null d/sW null d/sSU{N

                /uW ~ d/yUP ~ d/xUP ~ d}b/sU{xUP yUP uW sLT}b/sST{N/sW ~ d/ySP ~ d/xSP ~ d}b/sT

                {xSP ySP sW sLT}b/sR{: + R 0 0 M}b/sRxy{: matrix astore concat 0 0 M}b/eR/; , d

                /AddOrigFP{{&/FontInfo known{&/FontInfo get length 6 add}? dict `

                /WinPitchAndFamily ~ d/WinCharSet ~ d/OrigFontType ~ d/OrigFontStyle ~ d

                /OrigFontName ~ d & E/FontInfo ~ d}{! ! ! ! !}?}b/mFS{makefont

                Pscript_Windows_Font 3 1 $ put}b/mF42D{0 copyfont `/FontName ~ d 2 copy ~ sub 1

                add dict `/.notdef 0 d 2 copy 1 ~{@ 3 ^ sub Encoding ~ get ~ d}for & E

                /CharStrings ~ d ! ! & @ E/FontName get ~ definefont}b/mF42{15 dict ` @ 4 1 $

                FontName ~ d/FontType 0 d/FMapType 2 d/FontMatrix[1 0 0 1 0 0]d 1 ^ 254 add 255

                idiv @ array/Encoding ~ d 0 1 3 -1 $ 1 sub{@ Encoding 3 1 $ put}for/FDepVector

                Encoding length array d/CharStrings 2 dict `/.notdef 0 d & E d 0 1 Encoding

                length 1 sub{@ @ 10 lt{! FontName length 1 add string}{100 lt{FontName length 2

                add string}{FontName length 3 add string}?}? @ 0 FontName @ length string cvs

                putinterval @ 3 -1 $ @ 4 1 $ 3 string cvs FontName length ~ putinterval cvn 1 ^

                256 mul @ 255 add 3 -1 $ 4 ^ findfont mF42D FDepVector 3 1 $ put}for & @ E

                /FontName get ~ definefont ! ! ! mF}b/mF_OTF_V{~ ! ~ ! 4 -1 $ ! findfont 2 ^ ~

                definefont fM @ @ 4 6 -1 $ neg put 5 0 put 90 matrix R matrix concatmatrix

                makefont Pscript_Windows_Font 3 1 $ put}b/mF_TTF_V{3{~ !}repeat 3 -1 $ !

                findfont 1 ^ ~ definefont Pscript_Windows_Font 3 1 $ put}b/UmF{L2?

                {Pscript_Windows_Font ~ undef}{!}?}b/UmF42{@ findfont/FDepVector get{/FontName

                get undefinefont}forall undefinefont}b

                %%EndResource

                end reinitialize

                Pscript_WinNT_Incr begin

                %%BeginResource: file Pscript_Encoding256 5.0 0

                /CharCol256Encoding[/.notdef/breve/caron/dotaccent/dotlessi/fi/fl/fraction

                /hungarumlaut/Lslash/lslash/minus/ogonek/ring/Zcaron/zcaron/.notdef/.notdef

                /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef

                /.notdef/.notdef/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign

                /dollar/percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma

                /hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon

                /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S

                /T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave

                /a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright

                /asciitilde/.notdef/Euro/.notdef/quotesinglbase/florin/quotedblbase/ellipsis

                /dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE/.notdef

                /.notdef/.notdef/.notdef/quoteleft/quoteright/quotedblleft/quotedblright/bullet

                /endash/emdash/tilde/trademark/scaron/guilsinglright/oe/.notdef/.notdef

                /Ydieresis/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar/section

                /dieresis/copyright/ordfeminine/guillemotleft/logicalnot/.notdef/registered

                /macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph

                /periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter

                /onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis

                /Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute

                /Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis

                /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls

                /agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute

                /ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve

                /oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex

                /udieresis/yacute/thorn/ydieresis]def EncodeDict/256 CharCol256Encoding put

                %%EndResource

                end reinitialize

                 

                %%IncludeResource: font Helvetica

                Pscript_WinNT_Incr begin

                %%BeginResource: file Pscript_Win_Euro_L2 5.0 0

                /UseT3EuroFont{/currentdistillerparams where{pop currentdistillerparams

                /CoreDistVersion get 4000 le}ifelse}bind def/NewEuroT3Font?{dup/FontType get 3 eq{dup/EuroFont known exch/BaseFont known and}{pop false}ifelse}bind def /T1FontHasEuro{dup/CharStrings known not{dup NewEuroT3Font?{dup/EuroGlyphName get exch/EuroFont get/CharStrings get exch known{true}ifelse}{pop false}

                ifelse}{dup/FontType get 1 eq{/CharStrings get/Euro known}{dup/InfoDict known{

                /InfoDict get/Euro known}{/CharStrings get/Euro known}ifelse}ifelse}ifelse}bind

                def/FontHasEuro{findfont dup/Blend known{pop true}ifelse}bind

                def/EuroEncodingIdx 1 def/EuroFontHdr{12 dict begin/FontInfo 10 dict dup begin

                /version(001.000)readonly def/Notice(Copyright (c)1999 Adobe Systems

                Incorporated. All Rights Reserved.)readonly def/FullName(Euro)readonly def

                /FamilyName(Euro)readonly def/Weight(Regular)readonly def/isFixedPitch false

                def/ItalicAngle 0 def/UnderlinePosition -100 def/UnderlineThickness 50 def end

                readonly def/FontName/Euro def/Encoding 256 array 0 1 255{1 index exch/.notdef

                put}for def/PaintType 0 def/FontType 1 def/FontMatrix[0.001 0 0 0.001 0 0]def

                /FontBBox{-25 -23 1500 804}readonly def currentdict end dup/Private 20 dict dup

                begin/NDdef/NPdef/lenIV -1 def/RD{string currentfile exch readhexstring pop}def/-|{string currentfile exch readstring pop}executeonly def /|-executeonly def/|executeonly def/BlueValues[-20 0 706 736 547 572]

                |-/OtherBlues[-211 -203]|-/BlueScale 0.0312917 def/MinFeature{16 16}|-/StdHW

                |-/StdVW[71]|-/ForceBold false def/password 5839 def/Erode{8.5 dup 3 -1

                roll 0.1 mul exch 0.5 sub mul cvi sub dup mul 71 0 dtransform dup mul exch dup

                mul add le{pop pop 1.0 1.0}{pop pop 0.0 1.5}ifelse}def/OtherSubrs[{}{}{}

                {systemdict/internaldict known not{pop 3}{1183615869 systemdict/internaldict

                get exec dup/startlock known{/startlock get exec}{dup/strtlck known{/strtlck

                get exec}{pop 3}ifelse}ifelse}ifelse}executeonly]|-/Subrs 5 array dup 0

                <8E8B0C100C110C110C210B>put dup 1<8B8C0C100B>put dup 2<8B8D0C100B>put dup 3<0B>


                put dup 4<8E8C8E0C100C110A0B>put |- 2 index/CharStrings 256 dict dup begin


                /.notdef<8b8b0d0e>

                def end end put put dup/FontName get exch definefont pop}bind

                def/AddEuroGlyph{2 index exch EuroEncodingIdx 1 eq{EuroFontHdr}if systemdict

                begin/Euro findfont dup dup/Encoding get 5 1 roll/Private get begin/CharStrings

                get dup 3 index known{pop pop pop pop end end}{begin 1 index exch def end end

                end EuroEncodingIdx dup 1 add/EuroEncodingIdx exch def exch put}ifelse}bind def

                /GetNewXUID{currentdict/XUID known{[7 XUID aload pop]true}{currentdict/UniqueID

                known{[7 UniqueID]true}ifelse}ifelse}bind def/BuildT3EuroFont{exch 16 dict begin dup/FontName exch def findfont dup/Encoding get/Encoding exch def dup length 1 add dict copy dup/FID undef begin dup dup/FontName exch def /Encoding 256 array 0 1 255{1 index exch/.notdef put}for def GetNewXUID{/XUID exch def}if currentdict end definefont pop/BaseFont exch findfont 1000 scalefont def/EuroFont exch findfont 1000 scalefont def pop/EuroGlyphName exch def/FontType 3 def/FontMatrix[.001 0 0 .001 0 0]def/FontBBox BaseFont/FontBBox get def/Char 1 string def/BuildChar{exch dup begin/Encoding get 1 index get /Euro eq{BaseFont T1FontHasEuroifelse}ifelse{EuroFont

                setfont pop userdict/Idx 0 put EuroFont/Encoding get{EuroGlyphName eq{exit}

                {userdict/Idx Idx 1 add put}ifelse}forall userdict/Idx get}{dup dup Encoding

                exch get BaseFont/Encoding get 3 1 roll put BaseFont setfont}ifelse Char 0 3 -1

                roll put Char stringwidth newpath 0 0 moveto Char true charpath flattenpath

                pathbbox setcachedevice 0 0 moveto Char show end}bind def currentdict end dup

                /FontName get exch definefont pop}bind def/AddEuroToT1Font{dup findfont dup

                length 10 add dict copy dup/FID undef begin/EuroFont 3 -1 roll findfont 1000

                scalefont def CharStrings dup length 1 add dict copy begin/Euro{EuroFont

                setfont pop EuroGBBox aload pop setcachedevice 0 0 moveto EuroGName glyphshow}

                bind def currentdict end/CharStrings exch def GetNewXUID{/XUID exch def}if 3 1

                roll/EuroGBBox exch def/EuroGName exch def currentdict end definefont pop}bind

                def/BuildNewFont{UseT3EuroFont{BuildT3EuroFont}{pop AddEuroToT1Font}ifelse}bind

                def/UseObliqueEuro{findfont/FontMatrix get dup 2 get 0 eq exch dup 0 get exch 3

                get eq and UseT3EuroFont or}bind def

                %%EndResource

                end reinitialize

                7500 VM?

                /Helvetica FontHasEuro not

                {

                /Euro.Helvetica

                 

                AddEuroGlyph

                /Euro /Helvetica /Helvetica-Copy BuildNewFont

                } if

                F /F0 0 /256 T /Helvetica mF

                /F0S2AYFFFFFFD6 F0 mFS

                F0S2AYFFFFFFD6 Ji

                172 180 M ( )S

                172 3075 M (SEPARATE 10/01)[28 28 28 28 30 27 26 28 12 23 23 12 23  0]xS

                /F0S19YFFFFFFE7 F0 mFS

                F0S19YFFFFFFE7 Ji

                511 3075 M ( )S

                172 3108 M (Client: CO)[18 6 6 14 14 7 7 7 18  0]xS

                288 3108 M (-)S

                296 3108 M (8080392  Policy: 1BD0877415  Effective: 06/02/2011  Agent: SA039997    Printed: BATCH 06/01/11 20:08 )

                [14 14 14 14 14 14 14 7 6 17 14 5 6 13 12 7 7 14 17 18 14 14 14 14 13 14 14 7 7 17 7 7

                13 13 7 6 11 14 7 7 14 14 7 14 14 7 14 14 14 14 7 7 17 13 14 14 7 7 7 17 16 14 14 14

                14 14 14 7 7 7 6 17 8 6 14 7 13 14 7 7 17 17 14 18 18 7 14 14 7 14 14 7 14 14 7 14

                14 7 14 14  0]xS

                1479 3108 M ( )S

                172 3136 M (Insured: BIJOU TELEPHONE COOPERATIVE ASSOCIATION, INC.    Address: 1070 N HWY 36 PO BOX 276  BYERS, CO 80103)

                [6 14 13 14 8 14 14 7 7 17 6 13 19 18 8 14 17 14 17 17 18 19 18 17 7 18 19 19 17 17 18 17

                15 6 17 17 7 17 17 17 19 18 6 18 15 6 20 18 7 7 6 18 18 7 7 7 7 7 17 14 14 8 14 13

                13 7 7 14 14 14 14 7 18 7 17 24 16 7 14 14 7 17 19 7 17 19 17 7 14 14 14 7 7 17 16 17

                18 17 7 7 18 19 7 14 14 14 14  0]xS

                1623 3136 M (-)S

                1631 3136 M (0276)[14 14 14  0]xS

                F0S2AYFFFFFFD6 Ji

                1687 3136 M ( )S

                0.754 0.754 0.754 1 scol /F0S177YFFFFFE89 F0 mFS

                F0S177YFFFFFE89 Ji

                724 2160 M (NFUIC)[271 229 271 104  0]xS

                1870 2160 M ( )S

                0 0 0 1 scol F0S2AYFFFFFFD6 Ji

                172 228 M ( )S

                LH

                (%%[Page: 1]%%) =

                %%PageTrailer

                 

                %%Trailer

                %%BoundingBox: 2 2 610 790

                %%DocumentNeededResources:

                %%+ font Helvetica

                %%DocumentSuppliedResources:

                %%+ procset Pscript_WinNT_ErrorHandler 5.0 0

                %%+ procset Pscript_FatalError 5.0 0

                %%+ procset Pscript_Win_Basic 5.0 0

                %%+ procset Pscript_Win_Utils_L2 5.0 0

                %%+ procset Pscript_Text 5.0 0

                %%+ procset Pscript_Encoding256 5.0 0

                %%+ procset Pscript_Win_Euro_L2 5.0 0

                Pscript_WinNT_Incr dup /terminate get exec

                ehsave restore

                %%Pages: 1

                (%%[LastPage]%%) =

                %%EOF

                • 5. Re: Postscript coding to add a blank back pg to files with an odd number of pgs
                  Mr. Horton Community Member

                  You could search for "%%Pages: 1" and replace with "showpage" followed by an end of line and then "%%Pages: 2" to maintain the DCS integrity of the converted PostScript file.

                  If you could search and parse the page number then that would be better, otherwise you would need to have a multitude of search strings including every possible odd page numbering in your original set of files.

                  Note that this solution is dependent on the first pages comment deferring the actual count to the end of the document  "%%Pages: (at end)" as in the sample you provided.

                  • 6. Re: Postscript coding to add a blank back pg to files with an odd number of pgs
                    eodgers Community Member

                    That worked like a charm!  Thank you so much for your assistance with this!

                     

                    Eric