Jump to content

Advanced Page Usage


ksulliv1

Recommended Posts

Hi, I am wondering if there is a way, when building an online template, to only have the end user "preview" be only the dynamic page, but when the form is submitted, the production file uses all of the pages to create the proper imposed file?

 

So if I have a 4-page template, and only page 3 has editable FP content. I would like the user to not have to navigate the preview window to page 3, to see the edits they've made. And then have to do it again each time if they make changes. I would like the online electronic preview to just show the editable page only (page 3). But when the user goes ahead and submits the order, and initiates the FP composition of the production PDF. I would then still like it to use all 4 pages for that.

 

I don't know if anyone else has ever felt this would be of benefit, and suspect it isn't even possible. But you don't know for usre until you ask.

 

Thanks,

Link to comment
Share on other sites

To exactly what system are you submitting the online template and form data for Preview? MarcomCentral? EFI DSF? Your own custom web application? Some other system?

 

In MarcomCentral, a special CFG setting is passed to Preview jobs, which you can key off of in a JavaScript rule by calling the IsOnlinePreview function to do different things in Previews. (Or you can use the IsPreview function if you want different results in local Previews in Acrobat as well.) So you could do this in OnRecordStart:

FusionPro.Composition.SetBodyPageUsage(1, !IsOnlinePreview());
FusionPro.Composition.SetBodyPageUsage(2, !IsOnlinePreview());
FusionPro.Composition.SetBodyPageUsage(3, true);
FusionPro.Composition.SetBodyPageUsage(4, !IsOnlinePreview());

Or, more generally:

for (var pageNum = 1; pageNum <= 4; pageNum++)
   FusionPro.Composition.SetBodyPageUsage(pageNum, pageNum == 3 || !IsOnlinePreview());

If you're using some other web application besides MarcomCentral, then you may have to use some other trick, like passing a special field value as Eric describes, to have something else to key off of in your SetBodyPageUsage logic.

Link to comment
Share on other sites

We include a field for output style that passes "preview" or "print" and key off that to enable/disable template pages.

 

Thanks esmith this sounds promising. Can you please go into a little more detail regarding the process and steps? I am not quite understanding yet.

 

Thanks,

Link to comment
Share on other sites

So I have not been able to find a specific solution pertaining to our web server, and have been working with Eric trying to utilize his suggestion. And after a few attempts I am still failing to get the result I'm after.

 

As I said earlier, I have a 4-page template where the only dynamic content is on page 3. And I would like the ONLINE form to ONLY show that page, when the users are entering and editing their content. But would still like to have all 4 pages passed along and used to Compose the final production PDF for printing.

 

We don't use MarcomCentral so the option for using the IsOnlinePreview function is out. So here is what I have done so far.

 

I have gone into "Manage Pages" and set all of the pages except page 3 to "unused". And I have named the pages their corresponding numeric value. So page 1 is named "One", page 2 is named "Two" and so on.

 

Then I added a field to my data file called "Output" and I set it's value to "print".

 

Then I created a Callback rule using "OnRecordStart" with this code:

 

if (Field("Output") == "print"){

FusionPro.Composition.SetBodyPageUsage("One", true);

FusionPro.Composition.SetBodyPageUsage("Two", true);

FusionPro.Composition.SetBodyPageUsage("Four", true);}

However, when I upload the template to the server, it still shows all 4 pages in the online preview. So it is like the rule is being applied online as well as during composition. If I remove the rule, or change the value of the field "Output" to something other than "print", I only see page 3 and the composed output file is only page 3.

Any suggestions?

Link to comment
Share on other sites

However, when I upload the template to the server, it still shows all 4 pages in the online preview. So it is like the rule is being applied online as well as during composition. If I remove the rule, or change the value of the field "Output" to something other than "print", I only see page 3 and the composed output file is only page 3.

Well, sure, if the field value is still "print" in the online preview composition, then the rule will still take effect, and all your pages will be shown. You would need to somehow get the WebCRD application to modify the value in the data file based on whether you're doing a batch or preview composition. Or have it set some other field value or CFG entry, or something else that you could grab in JavaScript to key off of.

 

I think that when Eric said, "We include a field for output style that passes 'preview' or 'print'", he was talking about something that the code in his company's own web application does when writing the input file for FusionPro. Unless you can get the application that's invoking FusionPro to somehow generate something different to tell FusionPro that you're in a "preview" composition, then there's no way for FusionPro itself to know that, nor for you to be able to divine that information in any JavaScript rule.

 

So, since you're using RSA's WebCRD application instead of your own custom web application that you're writing yourself, only the folks from RSA would be able to tell you what, if anything, their application sets in this regard. Perhaps they need to enhance their web application to set the CFG entry "isOnlinePreview=Yes" like MarcomCentral does. I would contact RSA to ask them about what their app does, or could do, to help you out.

Link to comment
Share on other sites

Ok guys thanks alot for all of your help and explaination of my particular situation. I got it know. The problem isn't with the theory of what I was trying to do. It was just that our web server and application associated aren't offering the necessary pieces. And neither solution suggested here is going to apply in my case. I will continue to work on a solution from RSA if possible.
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...