step Posted May 1, 2013 Share Posted May 1, 2013 Is there a reason that preview would break when referencing something via a relative path rather than an absolute path? My folder structure is set up as such: -_javascript folder --externaljs.js -_template folder --templatefile.pdf OnJobStart Callback: Load("../_javascript folder/externaljs.js"); // does not allow previews //Load("/Users/Ste/Desktop/_javascript folder/externaljs.js"); // does allow previews Does anyone have any ideas? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 1, 2013 Share Posted May 1, 2013 Well, the search path is set up a bit differently for Preview, since the input file is a temp file with the single record of data. But it should still work, since the template path is the same. So I'm not sure what's wrong. In any case, you can work around the problem using the FusionPro.Composition.isPreview property. Quote Link to comment Share on other sites More sharing options...
step Posted May 1, 2013 Author Share Posted May 1, 2013 In any case, you can work around the problem using the FusionPro.Composition.isPreview property. Using the FusionPro.Composition.isPreview property in what capacity? Like this? var extjs = (FusionPro.Composition.isPreview) ? "/Users/Ste/Desktop/_javascript folder/externaljs.js" : "../_javascript folder/externaljs.js"; Load(extjs); Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 1, 2013 Share Posted May 1, 2013 Using the FusionPro.Composition.isPreview property in what capacity? Like this? var extjs = (FusionPro.Composition.isPreview) ? "/Users/Ste/Desktop/_javascript folder/externaljs.js" : "../_javascript folder/externaljs.js"; Load(extjs); Yes, like that. 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.