Jump to content

Rule to split pdf in half


mclisa81

Recommended Posts

Hi,

 

I need help with some javascript. A client is supplying me the page count of the pdfs they are supplying. How can I divide the number of pages supplied in half and return a certain range. I hope this isn't too vague. For example, Field1=32. I need to divide that in half and return a certain range of pdf pages within my template.

Link to comment
Share on other sites

Hi Dan,

 

I'm still struggling with this. I decided to delete my other posts because I've been working on it for 3 days and I've found some things out and changed some. I'm stuck on the crashing when I try to use the fpi file with my template. It only started crashing after I added the multi page pdf rule to my template. It crashes every time. I'm uploading my template to make it easier to see. Maybe since the page count is in the data, the rule can be simplified and that would stop the crash. Any help would be appreciated. Thanks.

Royal_template.zip

Link to comment
Share on other sites

Have you tried deleting "TextinsertionruleFront" and composing your output file?

 

I have a feeling that since both "TextinsertionruleFront" and "TextinsertionruleBack" have defined javascript globals differently (i.e. pageLoop), it is causing some confusion at composition.

 

If it composes fine afterwards, you may want to define the global variables locally in each respective rule.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...