Jump to content

Dan Korn

Members
  • Posts

    4,882
  • Joined

  • Days Won

    17

Everything posted by Dan Korn

  1. I don't understand what you're trying to do. Why not just have the function return the resource itself, instead of a string? Maybe posting your function code would clarify. If you're doing something like this: function GetResource() { return 'Resource("page1-stone1-10.tif")'; } Then you should do something like this instead: function GetResource() { return Resource("page1-stone1-10.tif"); } Again, if you post your current code then someone here will probably be able to spot the problem pretty quickly.
  2. Thanks for the picture. This is an interesting job. I think a table could work. That double-wide box in your picture could be accomplished with an "hstraddle=3" attribute on the <cell> tag to merge multiple table cells together. The fill color can be accomplished with the "shading" attribute. You can also use the "minheight" attribute on your <row> tags to set the height of the boxes. The arrows can just be inline graphics in their own smaller rows and columns. If you're not using a table, then to accomplish the double-wide box in your picture, you would need to either have a separate frame, and suppress the other boxes you're not showing, or modify the width of that frame. But the more I think about this, a table seems easier to line everything up.
  3. Thomas's advice is excellent, as usual. That said, like I mentioned in that other thread, I suspect that there's a way to set up your job so that you don't need 15 different pages in the first place, though I would have to know more about the output you're trying to make.
  4. Can you be more specific about what's not working? I think all you need to do is this: function datamatrix() { var bc = new DataMatrixBarcode; bc.processTilde = true; bc.encodingMode = "TEXT"; bc.preferredFormat = 2; bc.pointSize = 3; bc.noFontTag = false; bc.font = "IDAutomationDMatrix"; return bc.Make(Field("Match")); } You don't need to re-create all the boilerplate DataMatrix code that's already in Builtins.js. Those functions and objects are designed so that you can set whatever properties you want in your own code that uses them. Also, note that you don't need to pass any parameter (such as "str") to these functions, since you're hard-coding the field value to use in there. You can just return the value you want.
  5. It's hard to know what you're trying to accomplish without more context. You probably want to have a loop to go through all of the frames, something like: for (var i = 1; i <= 20; i++) { FindTextFrame("Box" + i).fillColorName = colorName; } Though I think there's a fundamentally different way that you can put this job together. It seems like a lot of effort to line up all of those frames, which could be automated with a rule. (As we like to say, the reason you have a computer in the first place is to automate repetitive tasks.) There are a few things you could do: The simplest might be to create a table. Another would be to create the frames programmatically, with calls to GetBodyPage(1).AddFrame() and setting the x, y, width, and height properties of the returned frame object, with a bit of math to space things out the way you want. Again, more context of what output you're trying to make would make it easier to make more specific suggestions.
  6. Use the "Format Field or Rule" rule instead, and select Number/Currency as the format, and $ as the currency symbol. This will ensure there are always two numbers after the decimal point (or however many numbers you specify in the Decimal Places box).
  7. Sorry, FusionPro won't impose that output directly. All output pages have to be the same size. There might be a way to accomplish this manually, but it won't be easy. Possibly you could divide the Flyer part into two different pages, imposed together with the space and bleed between the two halves discarded, but that's hardly optimal. I would just compose these as two separate outputs.
  8. I don't think you can. FusionPro's imposition system assumes that all output pages are the same size. It's also not clear to me conceptually how you would physically cut differently sized pages on an imposed sheet. That said, if you post a mockup of the desired output, maybe I (or someone else) could think of some creative solution.
  9. I've moved this to a new thread. You can just click the "Start new topic" button at the top of any page to ask a new question, instead of replying to an existing thread. I don't see any errors in the log file. Are there problems with the collected files? What are you doing with them after collecting?
  10. You can include all of the cover pages in your template, and mark them all as named Unused Body Pages, then in OnRecordStart, you can call FusionPro.Composition.SetBodyPageUsage("page name here", true) to activate the ones you want based on the data (from the user's selection). You can also create the OnPageNumber Event rule to do math and adjust the output page number, also based on the data.
  11. A rule in a FusionPro job can't change how the input form works in MarcomCentral. This is a question for MarcomPortal support, or your designated Marcom support person.
  12. There's a section in the User Guide that explains overflow pages. Also take a look at the Statement tutorial.
  13. You can certainly have additional pages turned on an off conditionally in a FusionPro job, either with Overflow pages, or by calling FusionPro.Composition.SetBodyPageUsage as appropriate in OnRecordStart, but I'm not sure of the capabilities of the online preview in MarcomCentral. Again, this is a question for the MarcomPortal-specific forum, or Marcom support.
  14. When you say "preview," do you mean the desktop preview in Acrobat, or the online preview in the MarcomPortal app? If it's the latter, that's a question for the MarcomCentral sub-forum, or your Marcom Support person.
  15. You're talking about the Web Collect functionality, and using that to create an HTML form on DSF? That Web Collect feature doesn't have the ability to hide or disable a pick list based on the selection in another pick list. Likewise, rules in the FusionPro template can do a lot to handle the data from the Web Collect form in various ways, but you can't control how the web form works with a JavaScript rule in your template. You'll probably need a custom web form of some kind to accomplish what you want. I would reach out to DSF support.
  16. That could be accomplished in a single statement, like so: return [Rule("01_startdate1format"), Rule("01_enddate1format")].filter(String).join('-');
  17. I would make a separate function, or a separate rule, to format each date. Then make another rule to combine them, like so: return [Rule("01_startdate1format"), Rule("01_enddate1format")].join('-');
  18. This was a fairly recent addition, in conjunction with another new feature where you can bring in a different DIF file as a repeatable component. Sorry, that was an oversight. I'm adding it into the Building Blocks now for FP 3.1.
  19. Any template? Including the installed tutorials? If so, then you might need to reinstall. If it's not really every template, then you'll have to attach something that reproduces the problem. Keep in mind that the size of a PDF page depends on who is asking. There are multiple page boxes. The Bleed setting on the Imposition tab of the Composition Settings dialog still affects the output, even if you're not using imposition.
  20. Sure, you can use the FusionPro.templateFileName property. I would do the whole thing like this: var iname = ReplaceFileExtension(GetFileName(FusionPro.templateFileName), ""); var range = FusionPro.Composition.outputRecordNumber + "-" + (FusionPro.Composition.outputRecordNumber + 100); FusionPro.Composition.outputFileName = iname + range + "." + (FusionPro.Composition.outputFormatExtension || "pdf");
  21. You could just go into the Define Data Source wizard and set the data source to None, then compose, and you should see the data field names in the text with curly brackets.
  22. You don't need any JavaScript for this. You can just go into the Composition Settings dialog, on the Output tab, check the "Output to multiple files" box, and set the number of records per file to 1. If you want to control the name of each output file, based on something like a data field value, then you can create the OnNewOutputFile rule (under the Event tab in the New Rule dialog), and set the FusionPro.Composition.outputFileName property to whatever you want.
  23. The value of the "isOnlinePreview" setting in the CFG file may not exactly match the string "Yes" case-sensitively. The global IsPreview() function is more robust, and will check for other variations in the CFG value, as well as checking for desktop preview. SoI would use that instead, like so: if (IsPreview()) FindGraphicFrame("KeylineGraphic").suppress = false; else FindGraphicFrame("KeylineGraphic").suppress = true; Or, more simply, just this: FindGraphicFrame("KeylineGraphic").suppress = !IsPreview();
  24. Sure, but you don't have to keep calling FindGraphicFrame over and over. You can put the result of that into a variable, like so: var frame = FindGraphicFrame("QR Code Front-001"); frame.x = Field("Xposition"); frame.y = Field("yposition"); frame.width = Field("Xsize"); frame.height = Field("Ysize");
  25. Acrobat Pro 2017 has been "out of core support" by Adobe for over a year. I recommend upgrading both Acrobat and FusionPro.
×
×
  • Create New...