Framemaker Transparency in Pdfs
Total Page:16
File Type:pdf, Size:1020Kb
FrameMaker Transparency in PDFs Tutorial www.front–runner.com 2017/04/17 Copyright © 2017 AG Information Systems Ltd. (referred to herein as GEO F/X). This documentation cannot be reproduced in full or in part by any means without the prior written consent of GEO F/X. GEO F/X provides this documentation as is without warranty of any kind, express or implied, including but not limited to implied warranties of appropriateness for specific purposes or merchantability. In no event or under any circumstances shall GEO F/X or its suppliers or distributors be liable for any damages whatsoever, including and without limitation, damages resulting from business loss, which may arise from the use or inability to use this documentation, even if GEO F/X, its suppliers or distributors have been previously advised of the possibility of such damages. Since some states do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you. AG Information Systems Ltd. GEO F/X Division Arnis Gubins Adobe Community Professional FrameMaker [email protected] i Table of Contents Creating transparency in PDFs with FrameMaker How to create a transparent coloured background text frame that overlays an image . 2 What is required . 2 How to do this . 2 Edit joboptions file(s) . .2 Setting up transparency in FrameMaker . 5 pdfmark codes . 5 /SetTransparency . .5 How to use pdfmarks in FrameMaker . 6 How this works . .10 Enhanced example with a border . .11 Try it out . .11 Adding the text to the transparent frame . .12 Tips to make this easier . .12 Making the postscript code text disappear . .16 Postscript Text Frames: A better way . .17 Turning on/off . .17 Re-using postscript code . .18 Using EPS files as an alternative way . .19 Additional background fills and transparency effects . 21 ©4/17/17 AG Information Systems Ltd. — Contents are copyrighted. are — Contents Ltd. Systems Information ©4/17/17 AG Linear (axial) gradient effect (Type 2) . .21 Examples of effects due to varying coordinates . .23 Examples of effects due to varying exponent . .24 Examples using two colours . .25 Radial gradient effect (Type 3) . .26 Examples of effects varying Extend properties . .27 Examples of effects varying exponent N . .28 Transparent images . 29 JPG image example . .30 An easier way: EPS format . .32 Summary . 34 References . 35 Blend mode in transparency . 36 ©4/17/17 AG Information Systems Ltd. — Contents are copyrighted. ii Creating transparency in PDFs with FrameMaker This tutorial shows you how to create transparency effects in PDFs gener- ated from FrameMaker. The steps described can be automated with script- ing (either Extendscript or Framescript) to make the whole process easier. The scripting approach also would make it possible to easily allow trans- parency of images and to more easily utilize further effects such as gradi- ents and the various colour-blending modes available. Are you interested in how to create effects like these? FM Transparency? Lorem ipsum do pland sit amet, con sectetur a dip sching elit. I ped diam non nu my e plusmode tempor in cidunt ut labore et dolore. Oh magna alip quam erat volu pat. Ut dernime ad minim veniam, quis no strud exercit libration ullamcorper suscipit lab oris nisi ut aliquip ex ea commodo consequat. Duis autem vel eum irure dolor in reprehendert in voluptate velit esse molestaie consequat, vel illum dolore eu fugiat nulla pariatur. At vero eos et accusam et iusto odio blandit praesent luptatum delenit aigue duos dolor et molestias exceptur sint dupic non AG Information Systems Ltd. - GEO F/X Division 2 Creating transparency in PDFs with FrameMaker FM Transparency? Lorem ipsum do pland sit amet, con sectetur a dip sching elit. I ped diam non nu my e plusmode tempor in cidunt ut labore et dolore. Oh magna copyrighted. are Contents — Ltd. Systems Information ©4/17/17 AG alip quam erat volu pat. Ut dernime ad minim veniam, quis no strud exercit libration ullamcorper suscipit lab oris How to create a transparent coloured background text frame that overlays an image As FrameMaker uses a postscript imaging model and postscript itself doesn’t support transparency, the transparency has to be added at the PDF creation stage by Distiller using the SetTransparency pdfmark operator. To insert pdfmark operators into FrameMaker, one must either use a PostScript text frame or import an EPS file containing the appropriate pdfmark codes. What is required You will need to work with the following items: • Distiller joboptions/settings file(s) used in your PDF workflow • Text editor to create custom PS or EPS files with various effects. How to do this Edit joboptions file(s) You’ll first need to let Distiller know that it’s going to have to allow trans- parency to be created. Postscript, after all, is built on an opaque colour model, so by default Distiller has the transparency control turned off. So now you have to turn it back on. Creating transparency in PDFs with FrameMaker 3 1. Start Distiller and select the joboptions/settings file that you typi- cally use to create your PDFs. 2. Then from the menu, select Settings > Edit Adobe PDF settings... 3. If you do not have the full Acrobat installed, then in FrameMaker, select Print > Printer: Setup button> Properties button > Adobe PDF Settings tab: Default Settings. Select the joboptions file that is typically used for creating your PDF. Then click on the Edit... button. ©4/17/17 AG Information Systems Ltd. — Contents are copyrighted. are — Contents Ltd. Systems Information ©4/17/17 AG Note: You need to be 4. Check the Compatibility settings. They should be at least Acrobat 5.0 using a Distiller version of (PDF 1.4). 7.0 or greater to actually render the transparency effects. 4 Creating transparency in PDFs with FrameMaker 5. Now click on SaveAs and save this as a file called Transparency.joboptions in the default location presented to you. ©4/17/17 AG Information Systems Ltd. — Contents are copyrighted. are Contents — Ltd. Systems Information ©4/17/17 AG The file should now be saved in your local settings folder, typically located here: C:\Users\<user>\AppData\Roaming\Adobe\Adobe PDF\Settings 6. Open the Transparency.joboptions file using a text editor or FrameMaker in text mode (File > Open, select the file and then hold down the shift key when clicking on the Open button). 7. Change the value of the /AllowTransparency parameter to true. 8. Save the file (if using FM as the editor, use SaveAs and select the Text Only... format). Note: To those with more knowledge of PDF creation (perhaps you’ve taken one of Shlomo Perets/Microtype excellent courses), you may be wondering Creating transparency in PDFs with FrameMaker 5 why not just include your own call to distllerparams, as the joboptions file runs before any of your own code, i.e. << /CompatibilityLevel 1.4 /AllowTransparency true >> setdistillerparams Unfortunately, starting with Acrobat 8, the ability to change global Distiller parameters was removed, but not properly documented. Setting up transparency in FrameMaker Now that Distiller is allowed to create transparent objects, let’s see how to create a transparent object. pdfmark codes PDF supports more functionality than postscript does, but derives much of its core from postscript. So, there exists a pdfmark operator to allow you to insert PDF-specific commands in your postscript stream. The syntax of the operator looks like this: [ key0 value0 key1 value1 .... /keyword pdfmark The “[ ... pdfmark” delimits the value pairs and operation defined by the keyword for postscript. /SetTransparency One of the keyword operators is /SetTransparency. This operator sets the transparency (actually the opacity) used by stroke and fill operators to draw objects. The opacity value ranges from 0 (completely transparent) to 1 (completely opaque). The keys and values available for this operator are: ©4/17/17 AG Information Systems Ltd. — Contents are copyrighted. are — Contents Ltd. Systems Information ©4/17/17 AG Table 1: Graphics state parameters for transparency Key Value Meaning The alpha source flag (“alpha is shape”), specify- ing whether the current soft mask and alpha con- stant are to be interpreted as shape values ( true AIS Boolean ) or opacity values ( false ). Default is false Current blend mode. There are 16 different name or array of BM modes available. See the Appendix for exam- names ples.The default is Normal, if not specified. 6 Creating transparency in PDFs with FrameMaker Table 1: Graphics state parameters for transparency Current stroking alpha constant, specifying the constant shape or constant opacity value to be CA number used for stroking operations. Default is 1.0 Same as CA ca number , but for fill operations. Default is 1.0 copyrighted. are Contents — Ltd. Systems Information ©4/17/17 AG Current soft mask, specifying the mask shape or dictionary or SMask mask opacity values. Default is None None The text knockout flag, which determines the behavior of overlapping glyphs within a text TK Boolean object. Default is true Note: The pdfmark The key most relevant to simple background transparency is /ca (for fill- operator, keys and values ing shapes). are case-sensitive. The /CA key affects the outlines of any drawn lines and shapes, but is not important in FrameMaker (though interesting affects can be achieved). The /BM (blend mode) key specifies how the colours between the back- ground and foreground blend in the transparency effect. If you want to experiment with different effects, see Blend mode in transparency on page 36 for the key values along with examples. To set a 50% transparency to a filled object, the required pdfmark code would be: [ /ca 0.5 /SetTransparency pdfmark How to use pdfmarks In order for this command in FrameMaker to have any effect, it must be in FrameMaker interpreted as postscript commands.