Jump to content

ScottHillock

Registered Users - Approved
  • Posts

    96
  • Joined

Everything posted by ScottHillock

  1. The image links aren't working for me, so I can't determine how much of an effect that's having on composition time. But, it seems all of the copyfitting you're doing is increasing composition time by a lot. A test of 100 records with your provided file was 24 seconds, and then 8 seconds with copyfit off. Your Paragraph1 is the largest offender. The other ones also don't help. Take a look at Dan's excellent A better CopyFitLine
  2. When you validate the rule in the rule editor do you get an error message? Did you have the CreateResource pointing to an absolute path?
  3. var DateSplit = Field("Date").split("/"); return DateSplit[1] + "-" + DateSplit[0] + "-" + DateSplit[2]; Alternatively, you can use javascript's date functions which might be more flexible. var d = new Date(Field("Date")); return d.getDate() + "-" + d.getMonth() + "-" + d.getFullYear();
  4. Open the PDF in Acrobat and look at the "Standards" pane. It should be "PDF/VT-1". As for checking how optimized that PDFVT is, I'm not sure there is an easy way to check besides running a test to see how quickly it can render.
  5. This should do it: var PDFNames = [ '1.pdf', '2.pdf', '3.pdf', '4.pdf' ]; var RandomNum = Math.floor(Math.random() * PDFNames.length); return CreateResource(PDFNames[RandomNum]);
  6. Rename your PDF to all lower case. I haven't tried all possible variables, but I know it happens when you connect to a netatalk or helios afp share, and the remote filesystem is case sensitive.
  7. var Var1 = Field("name"); return Var1.replace(/([lL]ocation)+/g,"test");
  8. I would do this by creating a text frame set on top of a graphic frame and use this: Pic = CreateResource(Field("name") + ".pdf", "graphic", true); if (Pic.exists){ FindTextFrame("Text").suppress = true; return Pic; } else{ FindGraphicFrame("Image").suppress = true; return CreateResource(""); }
  9. Seems to work better if you use absolute paths instead of relative ones. I think it has something to do with FusionPro creating a temporary file when previewing which is in a different folder than the current document. So it can't find the resource based on relative paths. You can also set the Search Path in the compose window under the advanced tab.
  10. I installed FusionPro on a Windows VM. With or without generating the barcode, you are correct, the results are negligible. I didn't realize that the Windows version had such a wide performance difference than the mac version on composing. Sorry for jumping to the conclusion the 2d performance was to blame. I ran a loop to generate the barcodes so only 1 record is composed, but the barcodes are generated many times. And, on Windows my results were for 10,000 iterations: 0.50 seconds - FusionPro Datamatrix 0.03 seconds - Golang image generator 1.60 seconds - QR code On mac they were: 1570.15 seconds - FusionPro Datamatrix 0.03 seconds - Golang image generator 3.00 seconds - QR code So, you are correct Dan, on Windows Datamatrix performance is quite good. But on the mac it is quite slow.
  11. Dan, I think there was something wrong with your test. If the difference between with or without the barcode is only 4 seconds, I think you are still processing the barcode rule, especially if it is taking over 10 minutes. Composing without the barcode gives me a baseline of 34 seconds. Adding in the barcode to use the go app is 38 seconds, with FusionPro creating the barcode it is 745 seconds. That shows me that FusionPro creating the barcode is very slow.
  12. Weird, if I change the datamatrix code to just return ""; I get a speed of 34 seconds... Maybe you didn't edit the code correctly, or there's something wrong hardware wise with your workstation.
  13. Yes, sorry, by Composer I meant Creator. And my long 65 hour composition that reduced down to 7 hours was in Creator. Attached is a simple job that only creates the datamatrix barcode. My results, all using FusionPro Creator 9.3.36, from local ssd hard disk, all 16GB ram: macOS 10.11.6 (iMac Late 13, 3.5GHz i7) - 745 seconds macOS 10.13.1 (imac Late 13, 2.9GHz i5) - 845 seconds And PTI support's Windows FusionPro Creator result: - 635 seconds Using the datamatrix-as-image solution with FusionPro Creator, my time went down to 38 seconds. Archive.zip
  14. Dan, the source code of the library on this is MIT licensed. Which is pretty permissive. But, I agree others should always double check licensing and any possible copyright issues with code pushed out to the public domain. We've had the same performance from the FusionPro datamatrix encoder on macOS 10.9.x, 10.11.6, 10.13.1, and on Windows 10. I had PTI support run the same tests on Producer and Composer on Windows, and Composer on Windows had the same performance as I've experienced across all platforms. I agree many things effect composition speed. On this particular project that had multiple variable images, copyfitting, page selections, split outputs, and for 1.2 million records the composition time was reduced from 65 hours to 7 hours.
  15. If you've used the FusionPro datamatrix encoder you know it's painfully slow. Our usual solution for increasing performance on simple jobs is to have a 100,000 page pdf with a datamatrix barcode on each page, counting from 1-100,000. Then we use a variable image to grab the page number we need that matches the number we need. So pull in page 27, if you need a datamatrix of "27". We've come into a new project that though requires a more complex datamatrix code, so with a bunch of searching and testing I landed on using an open source encoder that would deliver the barcodes in a get request to an http server. Here's the code that ends up being used in FusionPro. You could also CreateResource on it, but for us this is the easiest drop in replacement. var VariableText = [color="red"]Field("FIELD")[/color]; var dataMatrixApi = NormalizeEntities("http://[color="Red"]127.0.0.1[/color]:3030/?text=" + VariableText); Pic = '<graphic file="' + dataMatrixApi + '">'; return Pic; Simply replace the red text with your requirements and ip address. Attached is the Mac command line application that I use, which will automatically listen on port 3030, and return a png of the barcode. It's a golang application so if you're on windows you can compile it yourself. I have mine set to autorun using "LaunchControl.app". You can also use Windows Task Scheduler to perform the same thing to auto launch at login/startup. Here's the code to compile yourself (you'll need to download golang to do so): package main import ( "bytes" "strconv" "net/http" "image/png" "github.com/boombuler/barcode/datamatrix" ) func handler(w http.ResponseWriter, r *http.Request) { datamatrixCode, _ := datamatrix.Encode(r.URL.Query().Get("text")) buffer := new(bytes.Buffer) png.Encode(buffer, datamatrixCode) w.Header().Set("Content-Type", "image/jpeg") w.Header().Set("Content-Length", strconv.Itoa(len(buffer.Bytes()))) w.Write(buffer.Bytes()) } func main() { http.HandleFunc("/", handler) http.ListenAndServe(":3030", nil) } Moving from the FusionPro encoder to this solution we saw an increase of 15x to our composition. This is on FusionPro 9.3.36. Not sure if 10 has the native JavaScript encoder from IDAutomation that would have even faster performance. But, this solution puts us super close to the speed we would get if we upgraded to Producer. golang-barcode.zip
  16. Not the most efficient, but you could do no crop marks, and use an imposition background sheet with manually created crop marks in the spot color, that would line up where the crop marks should be. http://forums.pti.com/showpost.php?p=11530&postcount=3
  17. In the future you can make a rule that returns the following and place it in front of the text that needs to be adjusted: return '<magnify type=setwidth factor=125>' + '<tracking newsize=-4>'; For some projects you just need to use the best tool for the job. Which might not always be FusionPro. Sometimes I use just plain old InDesign data merge because I know the benefit of matching formatting in FusionPro won't be worth the time savings. Would be nice if we could get more advanced (and accurate) native format editing of type. Maybe the html5 app will have this functionality, or maybe a lot less.
  18. Go to the paragraph settings select "Suppress if:" and choose "Containing Empty Variables".
  19. I assume this is with DSF or other solution. But you're probably looking for AddGraphicVariable. var array = ["Frame1","Frame2","Frame3","Frame4","Frame5"]; for (i=0; i < array.length; i++){ FusionPro.Composition.AddGraphicVariable(array[i], CreateResource("./img.pdf")); } I'm not familiar with DSF, but I'm assuming you can just put your logic above this snippet, then instead of returning something, return an empty string "" and replace what you would return where "./img.pdf" is.
  20. Did you define the "Search Path" in the composition settings? Are you using relative or absolute paths for the rules?
  21. The only problem with the OnRecordStart way is I haven't looked to see how to get tagged text to return correctly. var fieldsToModify = ["paragraphtext1", "paragraphtext2", "singlelinetext1"]; for (var i in fieldsToModify) { var field = fieldsToModify[i]; FusionPro.Composition.AddVariable(field, Field(field).replace(/(.*)(\s)(.+)$/, "$1 $3").replace(" ","<color name=White> </color>"); } Maybe it's possible, but I haven't looked. Also, the customer will likely have specific changes then for just singlelinetext1. Which is easy enough to add a for statement, but it also adds complexity to the code. Which is my next point. I might not be the only one not working on a project, or it might be months before I work on the project again. And it's easier to see in the rule list window exactly what fields have modifications made to them, vs having to open a rule and then go through the programming to see what's being modified. The core issue, and the reason for asking the initial question. Is being able to duplicate a rule, and just change the rule name to modify a new field. Which doesn't seem like a feature available. We can adjust our workflow to work around it.
  22. We get requests to edit customer supplied data on the fly. There might be 5 or so fields that need the same edits needed to each. I know we can do a loop and AddVariable for each all in one rule, but if there's specific instructions for just 1 or 2 fields, it's easier to keep the rules separate and just name the rules the same as the field name. Just looking for a way to make it less error prone, so we don't have to update the Field we're referencing for each.
  23. If I create a rule called "Rule1" is it possible to do something like this: var RuleName = rule.callee.name;
  24. Deactivate and reactivate a whole bunch of times. Clear system font caches. Reboot, Load all fonts again in Fusion.
  25. Is it possible to use a wildcard or regex to match a filename from a database field? In my database I have a callout for an image of "1", the actual filename is "1_logoname.pdf". All images have the underscore separator between the database callout and the additional description in the file name.
×
×
  • Create New...