Jump to content

Dan Korn

Members
  • Posts

    4,884
  • Joined

  • Days Won

    17

Everything posted by Dan Korn

  1. Thanks, that's exactly what I need to look at. I tried your job, and the dollar and cents amounts simply don't fit into those narrow little cells without wrapping, at least not when they're longer text with two or three digits for the dollar amount and two digits for cents. I'm not sure how it's working at all in your FP Preview, though it looks from the picture like those cells are wider. I see that you have copyfitting (Adjust text to fit) turned on for the frame, but I don't think that does what you think. Tables don't really get copyfitted like non-tables do. The whole idea of a table is that each row will grow taller to accommodate the content (of the tallest cell in the row) wrapping the text to multiple lines as needed, rather than the content shrinking to fit a cell of a fixed size. You can set the minimum height for a row, which you are, but not a maximum. Likewise, the entire table will grow in height as more rows (or larger rows) are added, so tables aren't usually expected to fit into a frame of a particular height; usually there will be an overflow page to accommodate tables with variable numbers or rows, such as in a bill statement. So, to make this work, you need to change the point size of the text, to make it smaller. You can simply change the point size in the text frame where you're calling out the table rule. When I set it to 8 points it all seemed to fit just fine. If you do really want to adjust the size of the content to fit into the table cell without wrapping to multiple lines, you can do that with a call to a function such as CopyfitLine. That's getting more complicated, and I'm not sure whether it's worth getting into until we're sure that's the effect you want.
  2. In my version of the rule above, in the loop: cell.Font = "Arial"; cell.PointSize = 10; Though if the data has formatting tags in it (such as from the rich text editor in MarcomCentral), those tags will take precedence over the font and size set in the rule.
  3. First, I can't resist taking your code, which is quite repetitive, and using some for loops to significantly reduce it, like so: // FPTable with Vars - v04 - cat //---------------------------------------------------------------- var symbol = '<superscript>'+"$"+'</superscript>'; var table = new FPTable; // Prices var col = new Array(10); // col[0] unused; 1-9 used for (var i = 1; i <= 9; i++) { table.AddColumn(3499.2); var num = "0" + i; col[i] = symbol + Field("column" + num + "_DOLLAR") + '<superscript>' + Field("column" + num + "_CENT") + '</superscript>'; } //---------------------------------------------------------------- // Table var Tmar = 50; var Bmar = 50; var MinH = 2880; for (var r = 0; r < 19; r++) { var row = table.AddRow(); row.minHeight = MinH; for (var c = 0; c < 9; c++) { var cell = row.Cells[c]; cell.HAlign = "Center"; cell.VAlign = "Middle"; cell.Margins = new FPTableMargins; cell.Margins.Top = Tmar; cell.Margins.Bottom = Bmar; cell.Content = col[c + 1]; } } return table; As to why this is composing differently in MarcomPortal, as Thomas notes, that's hard to say without more information. My guess is that you're using the rich text editor in Marcom to add formatted text, which is adding a tag such as <z newsize=10> to your data fields, causing the price data fields to be in a different font size than in the flat file data you're using in the FusionPro Creator composition (in Acrobat). Or perhaps it's something more fundamental, such as a mismatch in the collected template files you've uploaded to MarcomCentral. At any rate, I would start by getting the composition log file from the online composition. You can do this by viewing the output in the web browser, then going to the browser's address bar and changing the extension at the end of the URL from .pdf to .msg.
  4. Sure, instead of calling FusionPro.Composition.StartNewStack(), call FusionPro.Composition.OpenNewOutputFile(), optionally with a file name. You may also need to set FusionPro.Composition.chunksBreakStacks = true in OnJobStart so that the new output file (chunk) is created right away, breaking the current stack, rather than being deferred until the next stack break.
  5. Yes, it's in the works, though it's early days and we don't have any target release date yet.
  6. Does your Mac have a Silicon (M1 or M2) processor instead of an Intel processor? If so, you need to run Acrobat under Rosetta, as the FusionPro plug-in is an Intel x86_64 executable. From Acrobat, select Preferences, then go to General and, at the bottom under Application Startup, UN-check the "Enable native OS mode for optimal performance" box. Also UN-check the "Use only certified plug-ins" box.
  7. This has nothing to do with your font. It has to do with how FusionPro handles tagged markup (XML) data vs. "flat" (raw, or untagged) data. This is a frequently-asked question. If you search for "ampersand" here on this forum, you'll see a lot of similar questions, like this: https://forums.pti.com/showthread.php?t=5309 My reply in that thread is the short answer. Here's a longer explanation: When designing a template in FusionPro Creator, you're typically using "flat file" (delimited) data (tab-delimited, CSV, Excel, etc.), which usually has the data represented literally. An ampersand is just an ampersand, etc., such as in "PB&J". But a data file generated from a web form in MarcomCentral Portal (or EFI DSF and other such systems) is an XML (tagged markup) file. (This is because you can put formatting with tags like <b> in your template data with the rich text editor in Marcom.) And as in any XML file, certain characters, like ampersands, double-quotes, and less-than and greater-than, have to be represented by XML entities (& " et al), so that they're not misinterpreted as tags. So if you enter "PB&J" into the web form in Marcom, that will generate a data file with "PB&J" in it. (Actually it will be something like <story copyhole="name">PB&J</story> .) These data field values from the XML data file are brought into the FusionPro job as markup, with those entities present. So in rules, which can return either tagged/formatted markup or "raw" unformatted data, you have to account for whether the original data is tagged or raw. I don't know exactly what your rule looks like, but presumably it's something like this: return ToUpper(Field("name")); Let's just back up a bit and think about what happens if you return just the field, without ToUpper, like so: return Field("name"); Remember that if the data entered into the web form in MarcomCentral is "PB&J", the XML data file generated from that form and used in the FusionPro composition is "PB&J". If you return this from a rule directly with the Field function, you'll see the & entity in the output. This is where the "Treat returned strings as tagged text" box comes in. If you check that box, you'll get the expected "PB&J" in the output, because the entity returned from the rule will be parsed back into the literal ampersand. (Likewise, when a data field is used directly as a variable in a text frame, without a rule, FusionPro takes into account whether the data is tagged or not.) However, when you take that data field value "PB&J" and call ToUpper on it, it gets converted to "PB&AMP;J", which is basically what you're seeing now in the output. Checking that "Treat returned strings as tagged text" box should handle the tagged markup, but there's another problem. Unlike the "&" entity, "&AMP;" is not a valid entity, so you'll get a warning in the composition log (which is hard to find in a Marcom composition) and nothing at all for that entity in the output, so the output will be just "PBJ". (Entities in FusionPro markup are case-sensitive for historical reasons to differentiate things like ñ for lower-case ñ and Ñ for upper-case Ñ.) How to get out of this dilemma? Fortunately, there are several helper functions to deal with this. The most important ones are TaggedDataField and UntaggedDataField. These functions can figure out the data file format and return a string in the correct tagged or untagged format. You want to use these instead of the regular Field function to ensure that the data you're dealing with is in the right representation. You'll want to change your rule to: return ToUpper(UntaggedDataField("name")); This will properly convert the tagged markup from the data to the "raw" representation with the literal ampersand, and that will be capitalized, and the output will be correct. (Assuming you don't have any actual formatting tags such as <b> and <i> from the rich text editor in Marcom in the data.) Note that even in the simple case, without ToUpper, this change is required to handle both tagged and untagged data properly: return UntaggedDataField("name"); You might ask, why don't we change FusionPro to make the Field function always returns either the tagged or raw/untagged data, so that rules always work the same way, regardless of the data format? Well, we have thought about that, but for one, it would break a lot of existing jobs in the field, and two, it would still be a problem because in many cases, you do really need to know whether the data is tagged or not to be able to properly examine and modify it in different kinds of rules. Hope this helps.
  8. So there are two ways in which the output can be broken up, or "chunked," into multiple output files: static chunking and dynamic chunking. Static chunking (the older way) is where each output file (except for possibly the first) has the same (static) number of records, defined on the Output tab of the Composition Settings. The names of the output files are based on the output file name specified in the Composition Settings, with numbers appended, unless a different name is specified in the OnNewOutputFile callback rule. Dynamic chunking (the newer way) is where each output file can have a different (dynamic) number of records. This is done, as you are doing, by calling FusionPro.Composition.OpenNewOutputFile() in OnRecordStart. In this case, the name of the new output file is also based on the output file name specified in the Composition Settings, with numbers appended, a different name is specified in the function call. It sounds like you're doing a hybrid, both kinds of chunking at the same time, which does work, but it can be weird. Sometimes a new output file is triggered by the record number, a multiple of the number specified in the Composition Settings, and somethings it's triggered by the field value changing per your OnRecordStart rule. I don't completely understand what you're trying to accomplish, but I think that you want to tun off the static chunking, by unchecking the "Output to multiple files" box in the Composition Settings, and just use dynamic chunking. Then all the output files you're making will have their names specified by the call to FusionPro.Composition.OpenNewOutputFile(). Or, you could continue to use a hybrid of static and dynamic chunking, and create the OnNewOutputFile rule to specify the names of the files being broken up by record numbers.
  9. I see. You can always put a try/catch block around the call that's throwing the exception, like so: try { orderNumber = Field("Order Number"); } catch (e) { orderNumber = "(not sure what you want to happen here)"; // or just do nothing here in the catch block } You could even give it a list of field names to try, something like this: var val = null; var fields = ["Order Number", "OrderNumber", "OrderNum"]; for (var f in fields) { try { val = Field(fields[f]); break; } catch (e) { } } if (val == null) throw "No matching field name; tried: " + fields; return val; This is kind of a poor man's field mapper.
  10. Can you be a bit more specific? Are you referring to the "Empty field name" message? That's just a warning. Or some other error message? Also, can you post an example of a job that reproduces the problem, or at least a data file?
  11. I see. You need to click on the "More Tools" icon (the wrench with the plus sign) at the bottom of the Tools panel (on the right of the screen), OR click on the Tools tab at the top of the screen. Then scroll all the way down to Add-ons and select the FusionPro icon and click Add. Then the FusionPro icon will be present no the Tools pane, and you can select it to see all of the tools in the toolset. You can also right-click on the main toolbar on the top of the screen and click "Customize Quick Tools...", then scroll down and add any tools (from the FusionPro tool list of any others) to the main bar. Either of these should cause the selected tools to stay in the toolbar, even after closing and restarting Acrobat. However, sometimes, for reasons beyond the control of plug-in developers, you have to keep re-adding them. (This seems to be a bug in Acrobat.)
  12. I don't understand. You say the toolbar is there but you can't find the tools? You should also be able to access the top-level FusionPro menu in Acrobat. What OS are you on, and what specific version of Acrobat?
  13. Sure, you can just build up the path to the file, something like this: return CreateResource("\\\\server\\share\\path\\" + Field("Folder") + "/" + Field("FileName"));
  14. I haven't seen this. When I make a pie chart, and a value is zero, there's no segment in that color that I can see. There is an entry listing zero percent in the legend though. If you don't want that data with a zero to be in the chart at all, just don't output that row in the chart data markup. Presumably you have a rule that's building up that markup, so the rule can just omit any row with a zero. You can also hide the legend in the Chart Properties and "roll your own" legend in a separate text frame if you want. Of course, I could make more specific suggestions if you post the job.
  15. Sorry for the trouble. The auto-complete in the Rule Editor is not context-aware like in other code editors. It's just a simple list of keywords. Also, JavaScript lets you declare any variable and set it, so you wouldn't get any errors from making a global variable called chunksBreakStacks. I recommend searching in the Functions and Objects tabs of the Building Blocks and inserting from there. That should give you the correct syntax, and the description in the Building Blocks should have additional information about how to use it. I also recommend searching here on this forum to find working examples.
  16. I think I've suggested pretty strongly, in this thread and others, that it's almost always better to post the job files, as that makes it much easier for me, or anyone else who's trying to help, rather than just looking at the job through a keyhole. The collected PDF template is usually the best way to share the job. You can just do a Collect from the FusionPro menu in Acrobat and collect to a Zip file. This will bring in the data file. (You don't need to collect the fonts, unless the issue is specific to the fonts in the job, and they're really used only in Server and Producer compositions anyway. In this case, I already have the fonts I suggested, so I don't need yours.) Though as my signature notes, I make no promises about looking at any files. Others can feel free to look at them, though, and answer any questions. (In this case, it's pretty likely that I'll at least take a peek.) Of course, please do not post any personal or proprietary data. You can always mock up some dummy data, just enough to be able to compose or preview the job to reproduce whatever the issue is that you want looked at.
  17. So, you could add every graphic used by the template as a resource, and they will all get collected up and uploaded to Producer. But these will all get uploaded every time you compose, which will make each submission take longer, and will fill up the drive on the Producer machine more quickly. The best practice for Producer jobs is to put the graphics on the network, so that both local previews and Producer compositions can access them from a common location. On Windows, you will access the files via UNC paths, which start with two backslashes, something like "\\server\share\folder\filename.jpg". You can enter the path to the graphics (\\server\share\folder\) in the same Search Path location, on the Advanced tab of the Composition Settings, that you used for the relative path. If you have more than one location where graphics are located, you can specify multiple paths delimited with semicolons ; in that Search Path box. Another option is to set a global search path for all jobs submitted to the queue, in the Producer Configuration app, but this is more complicated and requires the graphics to be found differently in local previews than in Producer compositions.
  18. Sure. Those glyphs aren't unique to InDesign, they're just glyphs for characters in fonts, like any other characters. So like you asked in May, if you find a glyph in a symbol font, like Dingbats, you can definitely use it in FP. Actually, there are Unicode characters for check box ☑ and empty check box ☐, so you can just use those. They're in the Apple Symbols font, as well as Arial Unicode MS and others. So you could just paste the ☑ character directly into the Text Editor. For variability, you could make a rule like so: return '<span font="Apple Symbols">☑</span>'; There may be an even easier way to accomplish this, but I haven't seen your job.
  19. The resource exists, but not in the same folder as the template, so FusionPro doesn't know where to find it. You can add a rule with the search path to the graphic, as Susan suggests. But there's a much simpler solution: Go into the Composition Settings dialog, on the Advanced tab, and enter the path to the graphics in the Search Path box there. This can be a path relative to the template, so all I had to do to get it to work was simply type the folder name "fc pdf files" (without quotes) in that Search Path box, and the graphics are found.
  20. I think that WebCRD puts the full path to the graphic into a field in the data. So you can just call CreateResource on that data field, either with the "Insert Picture Rule" Form rule, or some code like this: return CreateResource(Field("GraphicUploadFieldNameHere"));
  21. My guess (without looking at the job files) is that you have partial transparency in the background, in which case flattening it would likely speed up the RIP time.
  22. You don't need any code at all to do this. It's just a matter of keeps, which you can control in the Variable Text Editor and Paragraph Formatting dialogs. Instead of having all the callouts to the rules like "Flight Segment #1", "Flight Segment #2", etc. all jammed together into the same paragraph (line) in the Text Editor, put a line break (paragraph break) between each one, and then select all of them, click Paragraph, and set Windows to 99 lines. This effectively means "keep the whole paragraph together." This will make each flight segment occupy its own paragraph, which is all kept together, so the flow won't break to a different frame or page in the middle of it. You may also need to adjust the "Flight Segment" rules to remove one of the <br> tags from each to avoid the extra space between each of these separate paragraphs.
  23. Well, it's hard to know what you're expecting, let alone why that's not the result you're getting, without more information, especially without the files. Note that this doesn't necessarily work with every PDF; it depends on how the objects are shown in the PDF file. If the PDF is merely a wrapper for a raster image, it's probably not going to work. If it's vector art, that's more likely to work. I would try just using the default "Change Color In PDF Resource Rule" Form Rule and see if that works. If you want to attach the graphic here, I can take a look at it. There are a few things you can do. You could subscript the inline graphic. You could adjust the height of the graphic. Depending on how you're trying to lay things out, you could just make this a separate frame, not inline at all. You could also use a table, and set margins separately for cells for the graphic and the other text. That's just a few of many possibilities. Sure! Thanks for an interesting question.
  24. You can change the color of a resource, and use it inline, but it works only for PDF resources, not for any other graphic format. If it's a PDF, you can just add a line like so before you return the resource: // Change all colors to Blue. Pic.ChangeColor("ALL", "0,0,255", 10);
  25. We have identified issues with FusionPro VDP running on Windows 10 and 11 with Controlled Folder Access enabled. FusionPro installs several files to the Public Documents folder, to which Controlled Folder Access blocks access by all apps that are not considered trusted, and Adobe Acrobat is not a trusted app. Therefore, FusionPro may not work properly with Controlled Folder Access. If you have problems installing, uninstalling, or using FusionPro VDP, check if Controlled Folder Access is turned on. You can check the setting like so: Open the Windows Security app by selecting the shield icon in the task bar. You can also search the start menu for Windows Security. Select the Virus & threat protection tile (or the shield icon on the left menu bar) and then select Ransomware protection. Check whether the switch for Controlled Folder Access is set to On. If the switch is set to On, you can click to turn it off. If the switch is disabled, then Controlled Folder Access has been turned on by your network administrator or IT department, and you will need to contact them to change the setting. We are working on changes to FusionPro VDP to work correctly with Controlled Folder Access enabled. Please contact Support for more information. UPDATE: FusionPro VDP 13 works properly with Controlled Folder Access enabled.
×
×
  • Create New...