Jump to content

ThomasLewis

Members
  • Posts

    292
  • Joined

  • Days Won

    10

Everything posted by ThomasLewis

  1. Your syntax isn't quite right. Try this instead: return '<b>' + emailarray[0] + '</b>' + "@" + emailarray[1];
  2. if (!variable) FindGraphicFrame("name").suppress = true; or FindGraphicFrame("name").suppress = (!variable);
  3. I realized that code came from an older piece that was setup for 2 page documents only and didn't check it close enough to realize it isn't as versatile as I thought. The code needs to change a little to work for records that are more than 2 pages. Attached is a revision that should work better. Revised code in sample: //name each graphic frame just the page number var pages_per_record = 4; var path_and_PDF_name = "16pager.pdf"; //================================================== var r = CreateResource(path_and_PDF_name,'graphic',true); FusionPro.Composition.repeatRecordCount = r.countPages / pages_per_record; for (i = 1; i <= pages_per_record; i++) { r.pagenumber = i + (FusionPro.Composition.outputRecordNumber * pages_per_record) -pages_per_record; FindGraphicFrame(i).SetGraphic(r);} impose_existing_pdf_sample.zip
  4. Here's something a little easier with instructions and a sample. Make a new blank PDF that matches the page count of each record in your PDF. So lets say its a 2 page postcard. Set your data file to be "None". Make a graphic frame on each page and name it the page number, ie "1" on page 1 and "2" on page 2. Add an Event rule for OnRecordStart with the following code: //name each graphic frame just the page number var pages_per_record = 2; var path_and_PDF_name = "16pager.pdf"; //================================================== var r = CreateResource(path_and_PDF_name,'graphic',true); FusionPro.Composition.repeatRecordCount = r.countPages / pages_per_record; for (i = 0; i < pages_per_record; i++) { r.pagenumber = i + (FusionPro.Composition.outputRecordNumber * pages_per_record) -1; FindGraphicFrame(i +1).SetGraphic(r);} Edit the pages per record if its different than 2 Put in the name of the PDF. If it's in a different location than the template you will need to add the path. Use "\\" for each folder, ie "C:\\temp\\mypdf.pdf" Compose as 1 record. impose_existing_pdf_sample.zip
  5. Smallcap is a way of making lowercase letters into smaller capital letters. For instance "Hello World" would keep the H and W the way they are and change "ello" and "orld" to the smaller caps. In your example "EXT" is all caps. You would need to change it to "Ext" or "ext" if you want to see the results. Also, don't forget to adjust the small caps ratio under Paragraph... Global Settings
  6. I get the concern in overcomplicating things but I think there would be a strong argument that if you are just going for most commonly needed things, uppercase would probably beat strikeout by a mile. Either way I'm really excited to hear about future improvements. If you guys do move forward with more complex editing like you mentioned, please consider giving us a "view source" button just like what's in the resource editor for formatted text. It's extremely helpful for diagnosing issues as they come up. I don't know how many times I've had to copy stuff from the variable text editor and paste it into the resource editor to see what's going on.
  7. I've always wondered why this isn't part of the Variable Text Editor. You have underline and superscript which follow the tags method, why not add an Uppercase button that add the <uppercase> tags?
  8. I've run into this same issue. I don't think phone extensions are part of the vCard spec. Putting it under NOTE: or omitting it entirely, depending on the client, is how I've handled it. This is an easy to read resource for all the other options available: https://www.evenx.com/vcard-3-0-format-specification There are more under the version 4.0 spec but I'm not sure how widely adopted that is: https://en.wikipedia.org/wiki/VCard
  9. What you are looking for is this: FindTextFrame("Frame Name").suppress = true; On newer versions of FusionPro you can also group them in the Document Overview palette and then use: ShowFrameGroup("Group Name", false) or HideFrameGroup("Group Name")
  10. You can do this by setting your data source to none. Then bring your data in as an external data file. You would set it up to loop the content in 3s and then repeat the record count to build out all your pages. However, this is an overly complicated way to do it and has potential for errors unless you are really familiar with how that method works. Personally, I would just setup a Pitstop action for the artwork that crops it down to 1, then use FusionPro Imposer to rebuild the imposition.
  11. One way to do this is stack all the text frames on top of each other and turn them all off via script. Then turn on the one that's needed. Make a new Event rule for OnRecordStart and add this: FindTextFrame("Name1").suppress = true; FindTextFrame("Name2").suppress = true; FindTextFrame("Name3").suppress = true; FindTextFrame("Name4").suppress = true; if (Field("Version") == "Ver1") FindTextFrame("Name1").suppress = false; else if (Field("Version") == "Ver2") FindTextFrame("Name2").suppress = false; else if (Field("Version") == "Ver3") FindTextFrame("Name3").suppress = false; else if (Field("Version") == "Ver4") FindTextFrame("Name4").suppress = false; You need to name your text frames appropriately and swap out the names in the script with whatever is in your document. The "Ver1", "Ver2", etc values should be whatever value would be in your Version field to determine which frame gets turned on. If this doesn't work out for you, I would suggest posting your template and sending a sample data file that doesn't contain anything personal in it.
  12. You're using a regular expression to do the replacement there in your script. The () aren't treated as literal characters in case, they split up segments into groups. You can escape them so they are treated as characters like this: return Field("Designation").replace(/\(TM\)/g,'<superscript>TM</superscript>'); But a better solution would be to just use a simple string replacement: return Field("Designation").replace("(TM)",'<superscript>TM</superscript>'); Or better yet use the actual TM entity: return Field("Designation").replace("(TM)", "&trade;");
  13. Not sure if this will help at all since it sounds like you are dealing with mostly text, but there is an optimization setting in the Output tab that allows for Advanced or Basic compression. Advanced significantly slows things down for me. I had one particularly heavy image job that composed in about 20 minutes using Basic, I did a test with Advanced and it took just over 2 and half days to complete. It seems the default setting is Advanced for some reason, I would recommend changing this over to Basic for most things, as it is significantly faster and Advanced only gives minimal file size savings.
  14. You might be thinking of "Create Resources" in the Steps palette. Add / Formatted Text / Edit. Even if you go this route though, if your data has embedded $ or cents, you will still need a rule to setup the superscript. I think I would forgo that and just setup a formatting rule for your amount field like this: var amount = Field("Amount").replace(/[^0-9.,]/g, "").split("."); return '<superscript>$</superscript>' + amount[0] + '<superscript>' + amount[1] + '</superscript>'; This calls in your amount, removes any non numerical entity, like a dollar sign, then splits it into an array with 2 sections at the decimal point. Then you are returning a superscript $, the dollar amount (at index 0), then superscript cents (at index 1).
  15. If you are using the text based QR rule you should be able to assign a background color to the text frame. The graphic based QR rule will always be a solid white. A workaround for this is to create your color box in Illustrator, set the opacity mode to Multiply, save it as a PDF. Then bring it into a graphic frame that overlays your QR frame.
  16. I think bmo is just trying to create a resource based on a series of things, ie building out the image name "page1-stone1-10.tif" bmo, if this is the case, you can create a Graphic rule that is simply: return CreateResource(page + "-" + type + "-" + number + ".tif", "graphic"); or return CreateResource(Field("page") + "-" + Field("type") + "-" + Field("number") + ".tif", "graphic");
  17. Another way to do this, if you are in fact talking about frames and not pages, is to move all the frames into a group using the Document Overview palette. This is a newer feature of FusionPro so you will have to be on one of the more current versions. If the Document Overview palette is not up, go to menu FusionPro / Palettes / Overview. Then switch to the Groups tab. There is a New Group icon at the bottom. Once you name the new group, drag the frames you want to group into it. Then, in OnRecordStart you would use something like this: if (!Field("fieldname")) HideFrameGroup("group name"); Then you don't have to worry about all the frame names or what pages they are on. So long as they are in the group they will suppress.
  18. Your question is rather confusing. You ask if there's a way to suppress pages but then everything else seems to be more about suppressing frames. Either way you can do both in OnRecordStart. Also, just to note, if a Field is empty it will evaluate as false. So you could do something like this in OnRecordStart: if (!Field("fieldname")) { FindTextFrame("Barcode1").suppress = false; FindTextFrame("Barcode2").suppress = false; FindTextFrame("Indicia1").suppress = false; FindTextFrame("indicia2").suppress = false; } or if (!Field("fieldname")) { for (i = 1; i <= 15; i++) { FindTextFrame("Barcode" + i).suppress = false; FindTextFrame("Indicia" + i).suppress = false; } } To suppress actual pages it would be: if (!Field("fieldname")) { FusionPro.Composition.SetBodyPageUsage("page name a", false); FusionPro.Composition.SetBodyPageUsage("page name b", false); FusionPro.Composition.SetBodyPageUsage("page name c", false); } or use a loop if you named them accordingly.
  19. Ok so I took a closer look in what I posted, which was adapted from some older template. It definitely has some bugs in it when some of the data was missing or unused. I think this should work better. Disregard the previous. Variable_Tab_Sample.zip
  20. Here's a sample on how to do this adapted for your use. All the rules are in OnRecordStart with some comments on what's going on. It could probably be cleaned up some but I think it should work for your project. Variable_Tab_Sample.zip
  21. You can do something like this in OnRecordStart to control the visibility of the graphic frame. FindGraphicFrame("Manager Logo Frame Name").suppress = (Field("TPA Group Field") != "Manager" || Field("Manager Logo") == "No, I don't want the logo."); You need to name the logo frame and put whatever field you have in there that you mentioned was in the TPAs. This works by checking if they are not a "Manager" then it will be true and suppressed OR if they choose No then it will be suppressed. Also, if the managers are part of a Marcom Group you can filter the Yes/No dropdown so that only managers can see the Yes option. With the above rule in place they will still be suppressed for non managers but it will make more sense for them if they can't ever choose Yes to begin with.
  22. Did you copy and paste the lines or did you key them in? If you keyed them in you probably put a comma where a semicolon needs to go. Only way to know for sure is if you attach the PDF file.
  23. Also not listed in the Building Blocks/Objects. Makes you wonder how many other goodies are hidden in there somewhere.
  24. Put this in OnRecordStart. Make sure it's enabled. The rule was turned off in sample provided. for (i = 56; i > Field("Page Qty") * 2; i--) FusionPro.Composition.SetBodyPageUsage(i, false);
  25. I am not aware of any way to get the template PDF name. I really wish that was a thing as I could make good use of it myself. Unless someone else knows of some way to do it you pretty much have to hardcode it in. FusionPro.Composition.outputFileName = "MyTemplateName_" + range + "." + FusionPro.Composition.outputFormatExtension;
×
×
  • Create New...