PrintNW Posted May 7, 2015 Share Posted May 7, 2015 I'm looking for a wal (and a rule configuration) that will hide an image frame during preview, but will create or display it during composition. Essentially this would work like a watermark, where the preview is not covered by any graphic, but when the product is composed (and imposed) the graphic is revealed. I've seen the following rule: FindGraphicFrame("Cover").suppress = !FusionPro.Composition.isPreview; Which sounds like the opposite of what I'm looking for. Any ideas on how I can do this? Quote Link to comment Share on other sites More sharing options...
step Posted May 7, 2015 Share Posted May 7, 2015 You're right the '!' negates the returned value of the "FusionPro.Composition.isPreview." If you want to suppress the graphic frame (aka setting the suppress property of the frame to 'true'), you need to remove the exclamation mark: FindGraphicFrame("Cover").suppress = FusionPro.Composition.isPreview; If you're using MarcomCentral (I can't tell since you haven't specified the software you're using) and you want the watermark to show during an online preview, you'll want to adjust the code to be: FindGraphicFrame("Cover").suppress = IsDesktopPreview() Quote Link to comment Share on other sites More sharing options...
PrintNW Posted May 7, 2015 Author Share Posted May 7, 2015 Thanks. This will actually be for both Marcom and for DSF. I forgot to ask what kind of rule to apply this to. Would it be a "OnRecordEnd" rule? Quote Link to comment Share on other sites More sharing options...
step Posted May 7, 2015 Share Posted May 7, 2015 Put it in the OnRecordStart callback rule Quote Link to comment Share on other sites More sharing options...
PrintNW Posted May 7, 2015 Author Share Posted May 7, 2015 Sorry, it's not working. I tried "FusionPro.Composition.isPreview" and "IsDesktopPreview()" and neither one removes the frame from the preview. Additionally, because I'm trying to simply hide something in the background when the job is composed and imposed, I switched the frame to a TextFrame and filled it with white in the background. Now my OnRecordStart rule reads: FindTextFrame("Cover").suppress = IsDesktopPreview() but it still appears in both the preview window and the imposed print PDF. This will eventually be for a Digital Storefront product, but uploaded to Marcom for the time being. Basically, I need a white box to appear when the final imposed PDF is created (covering up a logo) but when the product is previewed, I need the white box to be gone (revealing the logo). Any thoughts? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 7, 2015 Share Posted May 7, 2015 Sorry, it's not working. I tried "FusionPro.Composition.isPreview" and "IsDesktopPreview()" and neither one removes the frame from the preview. Additionally, because I'm trying to simply hide something in the background when the job is composed and imposed, I switched the frame to a TextFrame and filled it with white in the background. Now my OnRecordStart rule reads: FindTextFrame("Cover").suppress = IsDesktopPreview() but it still appears in both the preview window and the imposed print PDF. This will eventually be for a Digital Storefront product, but uploaded to Marcom for the time being. Basically, I need a white box to appear when the final imposed PDF is created (covering up a logo) but when the product is previewed, I need the white box to be gone (revealing the logo). Any thoughts? Please be more specific about what you mean by "preview." Do you mean Preview in Acrobat? In DSF? In MarcomCentral? Also, are there any error messages in the log (.msg) file? Quote Link to comment Share on other sites More sharing options...
PrintNW Posted May 7, 2015 Author Share Posted May 7, 2015 Sorry for the confusion. When I say "preview" I refer to the Marcom preview window that the user of the online storefront sees. I looked at the "FusionPro_collect.msg" and there are no errors whatsoever listed. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 7, 2015 Share Posted May 7, 2015 When I say "preview" I refer to the Marcom preview window that the user of the online storefront sees. Okay, try this (in OnRecordStart): FindGraphicFrame("Cover").suppress = IsOnlinePreview(); Or, to suppress the frame in a Desktop Preview in Acrobat as well: FindGraphicFrame("Cover").suppress = IsPreview(); I looked at the "FusionPro_collect.msg" and there are no errors whatsoever listed. I meant the composition log, not the collect log. Quote Link to comment Share on other sites More sharing options...
jwhittaker Posted May 7, 2015 Share Posted May 7, 2015 What about this? It's probably not the most well written but it should work in a OnRecordStart rule. onlinePreviewVal = FusionPro.Composition.JobOptions.isOnlinePreview; desktopPreviewVal = FusionPro.Composition.isPreview; if (onlinePreviewVal == "Yes" || desktopPreviewVal == true) { var MyFrame = FindGraphicFrame("Cover"); MyFrame.suppress = true; } Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 7, 2015 Share Posted May 7, 2015 What about this? It's probably not the most well written but it should work in a OnRecordStart rule. onlinePreviewVal = FusionPro.Composition.JobOptions.isOnlinePreview; desktopPreviewVal = FusionPro.Composition.isPreview; if (onlinePreviewVal == "Yes" || desktopPreviewVal == true) { var MyFrame = FindGraphicFrame("Cover"); MyFrame.suppress = true; } If you look in Builtins.js, that's basically what the global IsPreview() function does: it returns true if either IsDesktopPreview() or IsOnlinePreview() do. Quote Link to comment Share on other sites More sharing options...
step Posted May 7, 2015 Share Posted May 7, 2015 (edited) Sorry, it's not working. I tried "FusionPro.Composition.isPreview" and "IsDesktopPreview()" and neither one removes the frame from the preview. If you want to suppress the frame from an online preview, give Dan's suggestion a shot: Okay, try this (in OnRecordStart): FindGraphicFrame("Cover").suppress = IsOnlinePreview(); Additionally, because I'm trying to simply hide something in the background when the job is composed and imposed, I switched the frame to a TextFrame and filled it with white in the background. Now my OnRecordStart rule reads: FindTextFrame("Cover").suppress = IsDesktopPreview() but it still appears in both the preview window and the imposed print PDF. This will eventually be for a Digital Storefront product, but uploaded to Marcom for the time being. Basically, I need a white box to appear when the final imposed PDF is created (covering up a logo) but when the product is previewed, I need the white box to be gone (revealing the logo). Any thoughts? I'm confused. Do you have a text frame and a graphic frame both named "Cover" now? This should suppress your text frame: FindTextFrame("Cover").suppress = IsOnlinePreview(); If you collect your template (FusionPro > Collect...) and post it to the forum, it might be easier to help diagnose where you're going wrong. Edited May 8, 2015 by step Quoting Dan Korn Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 7, 2015 Share Posted May 7, 2015 If you want to suppress the frame from an online preview, give this a shot: FindGraphicFrame("Cover").suppress = IsOnlinePreview(); Hmm, that sounds familiar. Okay, try this (in OnRecordStart): FindGraphicFrame("Cover").suppress = IsOnlinePreview(); Quote Link to comment Share on other sites More sharing options...
step Posted May 8, 2015 Share Posted May 8, 2015 Hmm, that sounds familiar. Sorry, Dan! I didn't you were suggesting the "IsOnlinePreview" function. I've updated my post; however redundant it may be. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.