%!PS % Temporary PostScript Transparency Demo forGuruGram #9D % ====================================================== % by Don Lancaster % Copyright c 2002 by Don Lancaster & Synergetics, Box 809, Thatcher, AZ, 85552 % (928) 428-4073 Email: don@tinaja.com Website: http://www.tinaja.com % Consulting services available http://www.tinaja.com/info01.html % All commercial rights and all electronic media rights ~fully~ reserved. % Linking usually welcome. Reposting expressly forbidden. Version 1.5 % Shows an initial attempt at PostScript to Distiller transparency for % Acrobat 5.0. See http://www.tinaja.com/glib/pstrans.pdf for details. % This is the Bait and Switch method and requires a one byte post patch. % ======== % make a new graphics state [ /_objdef {XGS1} /type /dict /OBJ pdfmark % fill the new overlay graphics state - See PDF manual for details [ {XGS1} << /Type /ExtGState /ca 0.5 % fill transparency is 0.5 /CA 0.5 % stroke transparency is 0.5 /BM /Normal /Name /XGS1 /AIS false /OP false /OPM 1 /op true >> /PUT pdfmark % make a new resources file for an Xobject [ /_objdef {XR1} /type /dict /OBJ pdfmark [ {XR1} << /ProcSet [/PDF ] /ExtGState << /XGS1 {XGS1} >> >> /PUT pdfmark % create a new xobject [ /_objdef {XOBJ1} /type /stream /OBJ pdfmark [ {XOBJ1} << /Type /XObject /Subtype /Form /FormType 1 /Name /XOBJ1 /BBox [0 0 1000 1000] /Resources {XR1} /Matrix [1 0 0 1 0 0] >> /PUT pdfmark [ {XOBJ1} (0 0.5 1 rg /XGS1 gs 4 10 6 -6 re f) /PUT pdfmark % ------- Do a real BP EP that later will get substituted % start a Begin Picture graphics overlay subroutine... [ /BBox [0 0 1000 1000 ] /_objdef {overlaypix} /BP pdfmark % [ /BBox [0 0 1000 1000 ] /_objdef {XOBJ1} /BP pdfmark % try duplicate % fill the Begin Picture graphics overlay Xobject subroutine... 0 0.5 1 setrgbcolor % on the aqua side of blue 4 4 6 6 rectfill % new square % complete the Begin Picture graphics overlay Xobject... [ /EP pdfmark % a dictionary entry can be added to overlay pix but a stream extension cannot % Write a two squares program... /twosquares { gsave translate 1 0.5 0 setrgbcolor % red side of orange 2 2 6 6 rectfill % do background opaque box [ {overlaypix} /SP pdfmark % show foreground transparent box % [ {XOBJ1} /SP pdfmark % show foreground transparent box grestore} def % Distill the two squares program. Initially use a BARE Distiller Job % Options that has no compression, no embedded fonts, and little else gsave 50 50 translate 10 dup scale 0 0 twosquares grestore showpage % IMPORTANT: Manual patching is now required per GuruGream 9a... % (0) Distill this file in Acrobat 5 using BARE job options. % (1) IN WORDPAD, change /FM1 4 0 R to /FM1 3 0 R and rename file. % EOF