%!PS % Temporary PostScript Transparency Demo forGuruGram #9A % ====================================================== % 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. /transoverlay { % make a new graphics state [ /_objdef {newgsstate} /type /dict /OBJ pdfmark % fill the new overlay graphics state - See PDF manual for details [ {newgsstate} << /Type /ExtGState /ca 0.5 % fill transparency is 0.5 /CA 0.5 % stroke transparency is 0.5 /BM /Normal /AIS false /OP false /OPM 1 /op true >> /PUT pdfmark % start a Begin Picture graphics overlay subroutine... [ /BBox [0 0 1000 1000 ] /_objdef {overlaypix} /BP pdfmark % fill the Begin Picture graphics overlay Xobject subroutine... 0 0.5 1 setrgbcolor % on the aqua side of blue 4 4 6 6 rectfill % complete the Begin Picture graphics overlay Xobject... [ /EP pdfmark } def % 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 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 transoverlay % create new objects 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, make a copy of g8demox.pdf Rename it g8demo.pdf. % (2) Change the "/GS1 gs" in XObject object 2 to "/GS2 gs". % (3) Change "/GS1 6 0 R" in Resource object 8 to "/GS2 1 0 R" % (4) Save and view as PDF 5. Rebuild is expected but should work. % (5) Do a self SAVE AS to g8demo.pdf to preserve new file for use. % Step (2) selects a transparent overlay graphics state for the top square. % Step (3) links the transparent graphic state for the top square % A finished example is http://www.tinaja.com/glair/g9ademo.pdf % EOF