Jump to content

ricky10ss

Registered Users - Approved
  • Posts

    35
  • Joined

Converted

  • FusionPro Products
    Yes

Converted

  • FusionPro VDP software version
    9.3.9

Converted

  • OS
    Windows 8

Converted

  • Acrobat Version
    Acrobat X (10)

ricky10ss's Achievements

Contributor

Contributor (5/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

10

Reputation

  1. Thanks Ste. I was going to use a OnRecordStart rule that turns on the correct pages for the slots see example below. To use the parsed data in your example on each page do I need to create a rule for each field and data set I am trying to use? If I want to use Slot2 and value. Do I have to create a rule Slot2CouponValue? and Slot2CouponMileage for the mileage for Slot2?
  2. Attached is a sample data file with Slot1 - Slot68. Each slot could be a voucher or Coupon. The attached image shows what they are trying to do. The first character determines if the page selected is a coupon, voucher or blank. If a voucher then the next three character are the voucher number like SLOT35 in the sample data V203. If a coupon then the 2-3 character is the coupon code, 4-5 is the Service Type code, 6-11 in the mileage, and 12-15 is the value. Would need to parse each out to include the data into the coupon. Anyone have an idea on how to parse this out via Javascript? I could then turn on and off pages based on the it being a coupon, what version of coupon and/or if blank. Sample_Data.txt
  3. Sorry Step I am definitely confused. Sorry. So I should I still use this code for the onRecordStart ? var [ver, state] = Field("version").split(' '); var pdf = CreateResource('/path/to' + Field("version") + '.pdf', 'graphic', true); var pages = pdf.countPages; var form = 20; switch(state) { case 'CO': form = 21; break; case 'LA': form = 24; break; case 'NC': form = 26; break; case 'NV': form = 23; break; case 'SD': form = 22; break; } FusionPro.Composition.repeatRecordCount = pages; var isForm = FusionPro.Composition.repeatRecordNumber == form; FusionPro.Composition.SetBodyPageUsage('page', !isForm); FusionPro.Composition.SetBodyPageUsage('form', isForm); Or this one as the OnRecordStart? var state = Field("State"); var pdf = '/path/to/LN-3001'; var form = 20; switch(state) { case 'CO': form = 21; break; case 'LA': form = 24; break; case 'NC': form = 26; break; case 'NV': form = 23; break; case 'SD': form = 22; break; } if (form > 20) pdf += ' ' + state; pdf = CreateResource(pdf + '.pdf', 'graphic', true); Do all the "form" and "page" pages get the same graphic variable assigned to them? I used this below. Right now only the first page comes in when I compose. if (Field("State") == "CO") { var pdf = "LN-3001 CO.pdf"; } else if (Field("State") == "LA") { var pdf = "LN-3001 LA.pdf"; } else if (Field("State") == "NC") { var pdf = "LN-3001 NC.pdf"; } else if (Field("State") == "NV") { var pdf = "LN-3001 NV.pdf"; } else if (Field("State") == "SD") { var pdf = "LN-3001 SD.pdf"; } // ... else { var pdf = "LN-3001.pdf"; } var pdf = CreateResource('G:\\BTS\\Variable Elements\\LifeShield STM UltraCare\\' + pdf ); pdf.pagenumber = FusionPro.Composition.repeatRecordNumber; return pdf;
  4. I created a OnRecordStart rule using the last bit of code you sent but nothing seems to be happening. I validate rule and Expression is OK. Do I need to do something with the graphic frame since no variable is assigned? Could it be this is incorrect? var pdf = 'G:\VP\Variable Elements\LifeShield\LN-3001.pdf';
  5. Sorry I am not trying to combine "LNG-3001.pdf" and all pages in "LN-3001 CO.pdf". So it sounds like your first response is what I am trying to do. With the code you posted below I have another question. How would I call the forms only from a field called State? I don't have a field calling out the specific name of the form. All I have in data provided to me is the State. So if the state equals to CO then I need to pull the resource "LN-3001 CO.pdf" and so one for LA, NC, NV, SD. All other states get "LN-3001.pdf". var [ver, state] = Field("version").split(' '); var pdf = CreateResource('/path/to' + Field("version") + '.pdf', 'graphic', true); var pages = pdf.countPages; var form = 20; switch(state) { case 'CO': form = 21; break; case 'LA': form = 24; break; case 'NC': form = 26; break; case 'NV': form = 23; break; case 'SD': form = 22; break; } FusionPro.Composition.repeatRecordCount = pages; var isForm = FusionPro.Composition.repeatRecordNumber == form; FusionPro.Composition.SetBodyPageUsage('page', !isForm); FusionPro.Composition.SetBodyPageUsage('form', isForm);
  6. Thanks Ste. Yes I noticed that after as well that the text boxes are not in the same locations. So with this rule you are just pulling in the specific pages correct? What if I need to pull in the whole form all pages for the standard form and all pages for the state forms? The only way I could think is make a page for all the common count pages till each variable pages then bring in the pages after. But the issue there is MO state form only has 22 total pages. Some of the state forms variable pages are past page 22.
  7. Attached are two documents. LNG-3001.pdf is the standard form and has the variable boxes only all states except CO, LA, MO, NC, NV and SD. LN-3001 CO.pdf is the form only for CO. The variable text boxes are on page 21. Each state form has the variable boxes on different pages.LN-3001 CO.pdf LNG-3001.pdf
  8. I am trying to figure out the most simple way to import multiple pdf's that have the same variable text boxes in the same location but on different pages. Below are the document names and the page the variable text fields are on. Everyone gets the standard form but if they are in any of the states below they get that specific state form. LNG-3001 (Standard form - Page 20) LN-3001 CO (Colorado – Page 21) LN-3001 LA (Louisiana – Page 24) LN-3001 MO (Missouri – Page 20) LN-3001 NC (North Carolina – Page 26) LN-3001 NV (Nevada – Page 23) LN-3001 SD (South Dakota – Page 22) In the past I was able to use the code below to import specific pages till I got to the variable page 4 then import the rest of the pages since all documents had the variable on the same page. Bringing in specific page: var image = CreateResource(path + image,"graphic",true); image.pagenumber = 1; return image; Then the last pages after page 4: var result = []; var r = CreateResource(path + image,"graphic",true); for (r.pagenumber = 4; r.pagenumber <= r.countPages; r.pagenumber++) result.push(r.content); return result.join("<p>\n");
  9. Was wondering is there a way to change the composed output file to sort alphabetically by the last name which is a field in the csv file instead of the sequence provide in the csv? I would be using FP Imposer to impose.
  10. Below is the onRecordStart rule I was using but I found out I need to adjust to another field. The switch rule below is turning on the specific pages based off their plan. But there is a value field called "Amount" that if there is no value for 250, 500, 750 and 1000 plans they do not get 250_500_750_1000NonInsured P1 or 250_500_750_1000NonInsured P2. What would you recommend doing for this? switch (Field("PLANOPTION")) { case "200": FusionPro.Composition.SetBodyPageUsage("200 P1", true) FusionPro.Composition.SetBodyPageUsage("200 P2", true) FusionPro.Composition.SetBodyPageUsage("200NonInsured P1", true) FusionPro.Composition.SetBodyPageUsage("200NonInsured P2", true) break; case "250": FusionPro.Composition.SetBodyPageUsage("250 P1", true) FusionPro.Composition.SetBodyPageUsage("250 P2", true) FusionPro.Composition.SetBodyPageUsage("250_500_750_1000NonInsured P1", true) FusionPro.Composition.SetBodyPageUsage("250_500_750_1000NonInsured P2", true) break; case "500": FusionPro.Composition.SetBodyPageUsage("500_750_1000 P1", true) FusionPro.Composition.SetBodyPageUsage("500_750_1000 P2", true) FusionPro.Composition.SetBodyPageUsage("250_500_750_1000NonInsured P1", true) FusionPro.Composition.SetBodyPageUsage("250_500_750_1000NonInsured P2", true) break; case "750": FusionPro.Composition.SetBodyPageUsage("500_750_1000 P1", true) FusionPro.Composition.SetBodyPageUsage("500_750_1000 P2", true) FusionPro.Composition.SetBodyPageUsage("250_500_750_1000NonInsured P1", true) FusionPro.Composition.SetBodyPageUsage("250_500_750_1000NonInsured P2", true) break; case "1000": FusionPro.Composition.SetBodyPageUsage("500_750_1000 P1", true) FusionPro.Composition.SetBodyPageUsage("500_750_1000 P2", true) FusionPro.Composition.SetBodyPageUsage("250_500_750_1000NonInsured P1", true) FusionPro.Composition.SetBodyPageUsage("250_500_750_1000NonInsured P2", true) break; }
  11. Hello, Have a field that is currency and wanting to multiple the field by 3. Example, $150 * 3 = $450. Anyone have any suggestions? Thanks
  12. Thanks Ste! You know your stuff. So trying to understand your last rule below. So if I want to include Cert3_1 for all generic states but Cert3_2 for only ID and IL. And Cert4_1 for all generic states but Cert4_2 for only IL and OK. How would I adjust? This should let me figure out the next page of variables. Thanks again! ['Cert1_1','Cert1_2','Cert2_1','Cert2_2'] .forEach( function(s) { var cert = Int(Field('Cert ID') - 1); var states = [ ['OH','TX'], ['ID','IL','OK'] ][cert]; var frame = 'Cert' + Field('Cert ID') + '_' + ((states.indexOf(Field('State')) > -1) + 1); FindTextFrame(s).suppress = s != frame; });
  13. Hello, Need some help with a project I am working on. We have 4 generic certificates that will go to specific states that are generic. There are also 4 certificates that could be state specific. On page 3 of the certificate there is one variable but depending on the state and certificate the text box location is different. I am trying to create a rule that looks at the Cert ID first then specific states would have their own Text frame. Below is what I started with and is not working for what I want. The first if statement is working for the two Cert 1 text boxes but all the Cert 2 text boxes are still on and vice versa. if (Field("Cert ID") == "1") { if ((Field("State") == "OH") || (Field("State") == "TX")) FindTextFrame("Cert1_1").suppress = true; else FindTextFrame("Cert1_2").suppress = true; } else { if (Field("Cert ID") == "2") { if ((Field("State") == "ID") || (Field("State") == "IL")) FindTextFrame("Cert2_1").suppress = true; else FindTextFrame("Cert2_2").suppress = true; } }
×
×
  • Create New...