Jump to content

Dan Korn

Members
  • Posts

    4,884
  • Joined

  • Days Won

    17

Everything posted by Dan Korn

  1. You're very close. The "if" line should be: if (option != "" && !outlaw.test(option)) { //if the optional field is not blank and doesn't contain "PO Box" then add to array You created a regular expression object to test against a string for a match, but you then have to call RegExp.test, or a similar method such as String.match, to check the string against the regular expression for a match.
  2. So the file you attached was made with FP 13.0.2. I wonder if the older version of the output, when it worked differently, was made with an older version of FusionPro which had been installed on the DSF server before it was upgraded to FP 13. Regarding record repeats, it's fairly easy to do in OnRecordStart, by setting the repeat count, something like this: FusionPro.Composition.repeatRecordCount = PDFresourceRef.countPages; And you can call out the page from the PDF resource that corresponds to the repeat number in the graphic rule, like so: PDFresourceRef.pagenumber = FusionPro.Composition.repeatRecordNumber; Then you don't need any extra Overflow or Template (Repeatable Component) pages. It's really a much simpler way to build a job like this.
  3. I'm having trouble understanding the requirements. A picture or mockup of the desired output might be helpful. That said, maybe what you want is a slip sheet, which can be set up on the Imposition tab of the Composition Settings.
  4. This is probably a question for DSF Support. The most likely root of this is that the version of FusionPro Server was updated on DSF. But I would need to at least see the output file from DSF to confirm that. This job may also be better accomplished by repeating the record for each PDF page inserted, rather than using the repeatable component.
  5. In this case, you want to specify the relative path in the Search Path box on the Advanced tab of the Composition Settings dialog. Multiple paths there can be delimited with semicolons.
  6. Why are you trying to use a relative path in the first place? The path is probably being stored as relative if you look in the .def file, and it will be found at composition time. But it will show as an absolute path in the resource editor, mostly because the File dialog needs to deal with full paths. So, it's not clear me me what you're trying to accomplish with a relative path in the editor. Is something not working when you specify the full path? Keep in mind that, if you're using Producer or Server to compose jobs, you probably want to be referencing your resources from a shared location, like a UNC path on Windows, or a Samba file share on Mac, and you want to keep that "Upload graphic files to FusionPro Producer" box unchecked when you submit a job to Producer. Otherwise, your graphics all get re-uploaded as copies every time.
  7. Sorry you're having trouble, but I can't troubleshoot this without more information. Please send the font file to Support.
  8. Is "Pure Black" a spot color? If so, you can go into the Colors dialog (from the menu in Acrobat, FusionPro -> Advanced -> Colors), and either edit the Black color and check the Spot Color box, or create a new color and check that box.
  9. Sorry, I'm confused. So when you give the rule "000.000.0000", does it change it to "000-000-0000" or not? An input value such as "000.000.0000" should be converted, but "000.000.000" should not, as that's not a valid input format. (Note the three digits after the last delimiter vs. four.) I think the best way forward here would be for you to collect up a small sample job which reproduces the problem and post it here.
  10. So you're giving it "intentionally wrong input." What result are you expecting? Also, you say that "in a recent few I've done," it's not working. What was different before? Were you on an older version of FusionPro? What was the result previously with the intentionally wrong input? Also, does it work if you give it valid input, such as "000.000.0000"?
  11. As of FusionPro VDP version 13.0, the Plug-ins folder is located in "/Library/Preferences/PTI/FusionPro/" on Mac, and "C:\ProgramData\PTI\FusionPro" on Windows.
  12. Can you post the job, or a minimal example which demonstrates the problem?
  13. Change the last line to: return MakeQRBarcodeGraphicColor(result.join(Chr(13) + Chr(10)), foreColor); You must be on an older version of FusionPro. As of FusionPro VDP version 10, the QR VCard Form (XML Template) rule supports colors.
  14. I see where you're going, but there's no text DOM or CSS. FusionPro uses some markup tagging that's similar to HTML, and rules can be written in a custom JavaScript context, but it's not an HTML/CSS rendering system. That said, you can definitely put a drop shadow on a text frame. From the Text Frame Properties palette, you need to click on the Advanced Text Effects button. It's on the bottom of the palette, next to the Overflow button. Then in the Advanced Text Effects dialog, you can check Drop Shadow, and set all the various attributes. You can also set up stroke or emboss if you want. As for modifying the text content, that can be done in a myriad of ways, with rules. That's what makes it a variable data composition system. You can definitely change the case of the text, concatenate to it, change its font, style, color, etc. Much of this can be done without any coding, with the Drag-and-Drop and Form rules; though you can do just about anything you can imagine with JavaScript rules. You might want to spend a bit of time with the User Guide and the tutorials.
  15. Well, there's really no such thing as a "vector" version of a QR barcode. It's literally one pixel per dot, so emitting vector drawing commands to draw a little black or white box for each dot would be much less efficient than just putting out the raster pixels. But you absolutely can specify the color for the graphic barcode, like so: var QR = new QRBarcode; QR.foreColor = "Red"; QR.backColor = "Blue"; return QR.MakeGraphic("hello"); Or just use the Form rule: If you want it to be a variable color, where you can get the RGB or CMYK color from data, then you can add a new color, called something like Custom, in the Colors dialog, and then create the "Color From Data" Event Form rule to override that custom color based on the data.
  16. You can't directly determine when a text frame is empty, but, in OnRecordStart, you can test whether whatever field or rule you're inserting into the frame is empty, and if so, turn off text wrap. Something like: if (!Field("YourFieldName")) FindTextFrame("YourFrameName").textWrap = false; Or, more succinctly: FindTextFrame("YourFrameName").textWrap = !!Field("YourFieldName");
  17. Wrap that code in a function and set the height and/or width property of the returned resource object, like so: function SenderResource() { switch (Field("sender").toLowerCase()) { case "Aneesa Din".toLowerCase(): return Resource("Aneesa Din"); case "Barbara Merz".toLowerCase(): return Resource("Barbara Merz"); case "Frances Cifrino".toLowerCase(): return Resource("Fran Cifrino"); case "Jeremiah Haruna".toLowerCase(): return Resource("Jerry Haruna"); case "Lois Quam".toLowerCase(): return Resource("Lois Quan"); default: return NullResource(); } } var r = SenderResource(); r.height = HundredthsOfPointsFromText("0.5 in"); return r;
  18. I would just do this and set composeThisRecord positively for the values you want, and negatively for others: FusionPro.Composition.composeThisRecord = (Field("LTRNM") == "CONFNL" || Field("LTRNM") == "Other Value"); Which I think more closely matches your stated logic that "There are only 2 codes that will get this letter I'm composing."
  19. Thanks for posting the job files. I've said this many times, but the most important thing you can do to troubleshoot a FusionPro job is to look at the composition log (.msg) file, especially for any message which may be relevant to the problem you're trying to solve. Again, ALWAYS look carefully at the log file. When I compose your job, this is the tenth line in the log file: This message also shows up in the Composition Status dialog. This is because of line 56 in the OnRecordStart rule: FusionPro.Composition.SetBodyPageUsage("Divder-ComIns", include); The name of the page here is misspelled; the actual page in the job is named "Divider-ComIns". The second "i" is missing in the page name in the rule. The FusionPro.Composition.SetBodyPageUsage function throws an exception when the page specified is not found. Unless the exception is caught with a try...catch block, the rest of the function, the rule in this case, is short-circuited, and the rest of the code after the exception is not run. This is the case here, where none of the rest of the code that tries to set the usage of any other pages gets run. If I fix that line so that the page name is correct, then I get another exception about another misspelling: When I fix line 64 of the rule as well, then I get this: This is because we have this loop: for (var i = 1; i <= 10; i++) FusionPro.Composition.SetBodyPageUsage("JFG" + i, include); But while the job has a page "JFG1", and "JFG3", and 4, 5, 6, etc., there is no page "JFG2" present. Nor is there a "JFG8". If you really intend to have that whole series of "JFG" pages except for "JFG2" and "JFG8", then you can modify the logic in that loop to skip those two, like so: for (var i = 1; i <= 10; i++) { // skip "JFG2" and "JFG8" if (i !=2 && i != 8) FusionPro.Composition.SetBodyPageUsage("JFG" + i, include); } With all these changes, the job composes without throwing any exceptions saying that a page is not found. Anyway, you get the idea. You have to get this to run clean, with no exceptions, where all the calls to FusionPro.Composition.SetBodyPageUsage specify valid Body page names, and then it should work properly. Again, the log file is your friend.
  20. It's hard to say what's going on without seeing the rest of the job. If you don't want to collect and post it, you could try some debugging statements, such as: Print('TrendsInclude="' + Field("TrendsInclude") + '"'); Print('ComInsInclude="' + Field("ComInsInclude") + '"'); // etc. And view the log (.msg) file to see the results. You might also consider setting the page usage in all cases, so that it doesn't matter whether the pages are set to Unused initially, something like this: var include = Field("TeamSlide") == "Yes"; FusionPro.Composition.SetBodyPageUsage ("Team+Management", include); FusionPro.Composition.SetBodyPageUsage ("Team-Only", !include); include = Field("ComInsInclude") == "Yes"; FusionPro.Composition.SetBodyPageUsage("Divder-ComIns", include); for (var i = 1; i <= 5; i++) FusionPro.Composition.SetBodyPageUsage("ComIns" + i, include); FusionPro.Composition.SetBodyPageUsage("ComIns-Fleet", Field("FleetInclude") == "Yes"); FusionPro.Composition.SetBodyPageUsage("ComIns-Captives", Field("CaptivesInclude") == "Yes"); include = Field("EmpBenefitsInclude") == "Yes"; FusionPro.Composition.SetBodyPageUsage("Divder-EmpBen", include); for (var i = 1; i <= 10; i++) FusionPro.Composition.SetBodyPageUsage("EmpBen" + i, include); include = Field("TrendsInclude") == "Yes"; for (var i = 1; i <= 13; i++) FusionPro.Composition.SetBodyPageUsage("EmpBenTrends" + i, include); include = Field("EducationInclude") == "Yes"; for (var i = 1; i <= 3; i++) FusionPro.Composition.SetBodyPageUsage("Education" + i, include); include = Field("COVIDInclude") == "Yes"; for (var i = 1; i <= 2; i++) FusionPro.Composition.SetBodyPageUsage("COVID" + i, include); include = Field("JFGInclude") == "Yes"; FusionPro.Composition.SetBodyPageUsage("Divider-JFG", include); for (var i = 1; i <= 10; i++) FusionPro.Composition.SetBodyPageUsage("JFG" + i, include); FusionPro.Composition.SetBodyPageUsage("Priorities", Field("PrioritiesInclude") == "Yes"); FusionPro.Composition.SetBodyPageUsage("Executive Summary", Field("ExecSummaryInclude") == "Yes"); Note the use of some "for" loops to reduce the repetitive code.
  21. If you want it to apply only to a particular record, you can just put the "if" statement right at the start, before the opening curly brace {, like so: // BEGIN: Rule converted from XML Template "Color From Data": if (Field("Sports Property Name") == "THUNDERING HERD") { // ... Then that entire block of code will be run conditionally. To apply the color change just to a particular text frame, please refer to my previous post. You need to make sure that only the text in that one frame is using the named color specified to override in the rule.
  22. Thanks for the follow-up. Yes, FusionPro should operate properly when Acrobat is running in Rosetta (Intel emulation) mode on a Silicon chip Mac (M1 or M2). But Rosetta must be installed. We'll update our instructions for setting up Acrobat with Rosetta. (And yes, we are working on a Silicon native plug-in that doesn't require the Rosetta emulator. It's complex with all of the library dependencies that FusionPro has.)
  23. Create a new color called "Custom" in the FusionPro -> Advanced -> Colors dialog. Then change the rule to override Custom instead of Black. Put the content that you want to have the rule applied to in the Custom color, and the text you want to stay Black in Black. If you want the color change rule to apply only to certain records, you can convert it to JavaScript and then put its code into an "if" clause, with whatever condition you want.
  24. tl;dr: Look in "/Library/Preferences/PTI/FusionPro". Yes, the locations of some installed files did change between FP versions 12 and 13. The main installation location on Mac has not changed: it's still the folder /Applications/PTI/FusionPro, where the FusionPro app and others are located. (On Windows, this is still "C:\Program Files\PTI\FusionPro" by default, though this can be changed by the user at install time.) But the locations of other files have changed, including some files which are meant to be either user-editable or updatable after installation by non-admin users. Specifically, many of the files which used to be in /Library/Application Support/PTI/FusionPro are now located in /Library/Preferences/PTI/FusionPro. This includes the startup.js file, the RuleTemplates.English.js and other language-specific files, and the subfolder Plug-ins/TemplateXML. As usual, I don't recommend modifying any .js files other than startup.js and RuleTemplate.English.js et al, nor modifying any of the installed .xml files, though you can add your own.
×
×
  • Create New...