Jump to content

kelly.anderson

Registered Users - Approved
  • Posts

    7
  • Joined

Converted

  • FusionPro Products
    No

kelly.anderson's Achievements

Rookie

Rookie (2/14)

  • First Post Rare
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter Rare

Recent Badges

10

Reputation

  1. I'm working on an application book that will be pulling in pdfs from a library based on the state. The number of pages in these pdfs vary from state to state. We have hundreds of these pdfs already created, but now we need each of them to be 1-sided (a blank page after every page). Rather than changing all the library PDFs to include blank pages, I'd really like to just add an empty page when composing the document instead. Currently I have my document set up with a Body page and a text box which links to an Overflow page's text box. This works correctly, but I don't know how to add in the blank page after every page. I think I'm close. Here is my text javascript rule so far: var Application = ""; var result = ""; if (Field("State") == "New York") { Application = "AppA.pdf" } else { Application = "AppB.pdf" } PDFArray = [Application] for (i = 0 ; i < PDFArray.length ; i++) { if (PDFArray != "") { myPDF = PDFArray; var Pic = new FusionProResource(myPDF, "graphic", "true"); for (Pic.pagenumber = 1; Pic.pagenumber <= Pic.countPages; Pic.pagenumber++) { if (Pic.pagenumber == Pic.countPages) { result += Pic.content+; } else { result += Pic.content+"<p>"; } } } } return result;
  2. I've found out the error! I was working on a file that a coworker had started, and discovered that she had named her rule OnRecordStart, but that it wasn't the callback rule. I've copied my rule over to the OnRecordStart Callback rule, and it now works without an error. Thanks for the feedback!
  3. I have tried several iterations of the rule, including the simplified switch rule such as the one you suggested, but I still get the same error, "Function does not return a value." I have double-checked the names of the pages and they do match what is in my rule. It is a Callback rule – an OnRecord Start rule. I have tried writing a rule to do the opposite, to initially have all my pages set to "Used" and then have the rule turn off all the unwanted pages. That rule does not give me an error message, but is a very long and cumbersome rule. It is almost like the program wants to have at least one page initially set to "Used" under Manage Pages. And as I said before, it WORKS, but it gives me an error message anyway. I hate to just ignore the message, but I'm not sure what is causing it.
  4. I have a multi-page PDF that will use only one of the pages based on the state the user selects. I've set all of the pages to "Unused" under manage pages, and have created a rule for OnRecordStart. This rule works fine and gives me the results I expect. However, it gives me the error "Function Does Not Return a Value" when I save the rule. It also gives me an error when I compose it, but the composed file IS correct. I'm guessing that my script is missing something. Here's what I have in OnRecordStart: if (Field("State") == "Florida") { FusionPro.Composition.SetBodyPageUsage("MC34310_FL", true); } else if (Field("State") == "New Hampshire") { FusionPro.Composition.SetBodyPageUsage("MC34285_NH", true); } else if (Field("State") == "New York") { FusionPro.Composition.SetBodyPageUsage("MC34467_NY", true); } else if (Field("State") == "Texas") { FusionPro.Composition.SetBodyPageUsage("MC34700_TX_1210", true); } else { FusionPro.Composition.SetBodyPageUsage("MC34188", true); }
  5. I'm able to control the width of columns with the javascript, but is there a way to control how tall a row is? I have my top and bottom margins set to '0', but they are still too tall. Is there a setting for defining the exact height I want the row to be?
  6. I am running the newest version of FP and was having the same problem. Here was my solution: If you copy your graphic files into the same folder on your computer as the template PDF file, then add them as a resource, they will show up in your preview. It's almost like FusionPro has trouble finding things outside of the current folder.
×
×
  • Create New...