Jump to content

Supress Graphic During Preview Only


Recommended Posts

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?

Link to comment
Share on other sites

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()

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;

}

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by step
Quoting Dan Korn
Link to comment
Share on other sites

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();

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...