Jump to content

Printing Partners

Registered Users - Approved
  • Posts

    61
  • Joined

Everything posted by Printing Partners

  1. Thanks Dan!!! I used the OnRecordStart approach and it is working fine. Thanks again.
  2. Dan, I have a template where the User can upload vector art. Some of the uploads have been PDFs, which default to the crop box. But their art is smaller (logos and such), so we get a lot of extra space around the logos when they "Fill" the graphic frame. I am hoping that the PDFBoundingBox will allow me to change that default to ArtBox so the logos will come in and size to fill the graphic frame without all of the extra space. What I keep getting wrong is the format of the code. I am not a programming expert. I have the code from FusionPro: <FusionProGraphicFrame>.PDFBoundingBox So where do I put the "ArtBox" instruction? I am guessing that "FusionProGraphicFrame" needs to be changed to the name of my graphic frame in FusionPro. Should this also be in a "OnRecordStart" rule? I am guessing it should be. I was hoping to find an example that gave me a basic understanding of how to format the code so I could learn how to set it up and format mine.
  3. Other than the UserGuide.pdf, TagsRefGuide.pdf, and RulesSystemGuide.pdf that are links in FusionPro, are there other references I can use to learn more about the scripting environment (other than this portal)? I am trying to create an OnRecordStart script and I am looking for more information than the above guides provide on the PDFBoundingBox. Thanks
  4. Ste, That worked perfectly! It was the "CreateResource" that I was not aware of. Saw it, but didn't understand how it worked. Also, thanks for introducing me to the short hand conditional statement. I had not used that before. Learned two things today! Now to go study up on both of them more. Thanks for the help! ________________________ The complete rule that I used, in case anyone else is in the same boat I was. var logo = Field("SecondaryLogo") ? Field("SecondaryLogo") : Field("PrimaryLogo"); return CreateResource(logo, 'graphic', true); if (Field("SecondaryLogo") != "") return logo; else return Field("SecondaryLogo");
  5. This should be fairly easy, I would think, but I can't seem to figure it out. I have a template where a User can upload 2 images into a template. If they only upload 1 image, I want to use that in both picture boxes in the template. Below is an over simplified script that fails, but it is essentially what I need: if (Field("SecondaryLogo") != "") return Field("SecondaryLogo"); else return Field("PrimaryLogo");My problem is how do I approach this as a rule in my template so Marcom knows what to do with it. Because it is a graphic rule, it wants me to return a graphic value. But how do you access User images uploaded in templates in a rule?
  6. Dan, Sorry, this was a script question that was part of a bigger problem I was trying to solve. It sort of evolved in my explanation, but it is still a scripting question. Marcom has iForms which is aware of what is in the FusionPro Fields (or form) when the job is submitted for preview. So they can be aware of each other, sort of. What I wanted to do was populate, via script, a field that iForms would then recognize. I can put a value in that field to render in the final output, but can't get it to pre-populate the value in the form, which is the only place iForms will detect it. What I was ultimately after was a script to "Pre-populate" a field. If I can do that, then iForms will do it's part and they can talk to each other. But I don't think that is possible. It was a long shot, but worth it to me to solve a problem.
  7. Ste, Thanks for the help. I finally realized I had the wrong function in "SetFieldValue". I will try what you have shown me, but I don't think I can accomplish what I am trying to do. I was finally able to get it to populate the field, but I am still not getting the result I want. I was hoping to "Pre-populate" a field so Marcom would pick it up for iForms pricing. I can change the value of the field, but it won't "pre-populate", meaning it won't show up in the field in the form, it will show up in the rendered PDF. As such iForms won't acknowledge the value I set. I am not sure if the OnJobStart rule will give me a different result.
  8. I am trying to set the value of an existing field in the OnRecordStart rule. I am having no success. I am currently using this expression: var size = "1440"; FindTextFrame("SquareInches").SetFieldValue = "size";Right now I am hard coding the "1440" to eliminate variables. This will eventually be: var size = (Field("pageHeight") * Field("pageWidth")); FindTextFrame("SquareInches").SetFieldValue = "size";I get no errors when I validate in FusionPro. But I can't get the value to appear in the Form Field in MarcomCentral. This has to be possible, I must be missing something simple. Ideas?
  9. Matt, The JQuery script is a good solution. But if that won't work for you a good resource for simple scripts with instructions is JavaScript Kit. Not the most advanced scripts, but they do work, link below. Just remember they Marcom is running the NoConflict script on their site. Good Luck! http://www.javascriptkit.com/script/cut118.shtml
  10. Matt, Will your script run locally on your computer? Does it fail only once uploaded to Marcom? Depending on what you are trying to run, Marcom does shutdown some scripting, they run a "no conflict" script. They do this so there isn't any conflicts between your script and theirs. If you are using JQuery you need to add a "j" after the "$". Try changing "$('#randombanner').attr('src',image[x]);" to "$j('#randombanner').attr('src',image[x]);"
  11. David, I have iForms. These are not pre-determined sizes. The User gets to type in whatever dimensions they want. From what I have read, iForms will not handle that. I do not see where iForms can calculate the size and produce a price. Is there something I have missed?
  12. Has anyone encountered a way to calculate the price of an item based on the size? I am attempting a product where the User can specify the height and width. But now I need to calculate the cost based on the size they have entered. So it needs to figure it on square inches or feet. Any ideas or experience doing this? I can calculate this in a rule, but how do you pass that to the Shopping Cart? thanks.
  13. I have a template that allows the User to Upload an image. I need to limit the file types they can upload to either AI or EPS. Is there a way to do that? Could it be done with a script? Any ideas would be appreciated.
  14. I found the discussion on Ad Resizing. So that answers the question: "Can I change the page size".
  15. This may be impossible, but I thought I would ask. I have a banner template. The User will upload a vector logo. If the logo is horizontal in shape, I want the logo to scale up to fill the picture box height. But then the box also needs to get wider as does the page. So I would need script(s) that would scale the logo, determine its width after scaling, adjust the size of the picture box, and then add the appropriate additional space to the template size. Would something like this even be possible? I half remember a thread about being able to re-size pages, but I couldn't find it in the forum. And this might need to be in the Javascript forum as well.
  16. I feel your pain, I worked all day yesterday to get this worked out. There are two basic scripts you need, plus the XDF file. These examples work by selecting a City from a pulldown in Marcom and returning the address and a graphic of the state. XDF File Your XDF data should be a Tab Delimited txt file. It needs to be loaded in Marcom. When you go to configure the template in Marcom, there is a tab at the top for "Shared External Data Files" go there, click on "Upload New Data File". (If you don't have the OnJobStart script with the call to the data file in your FusionPro Template, Marcom won't acknowledge the fact that the template requires an XDF file.) You need to map the data by selecting your Marcom Product from the list, click "Map Products". From the list select your Product and click save. (There is a note I read that says you need to have Published the template, for it to show up when you map the data.) In Marcom, when configuring the template, under the "Proof/Press Settings" tab, go down to "Edit External Data File Settings" and make sure the correct data file is selected. When you are finished publish normally in Marcom. The Scripts The scripts below require the values you have in your pulldown in Marcom, to be the first column record in your XDF file. This allows us to compare and select the right record. In Fusion Pro The first script is a OnJobStart script that calls your data. The file name MUST match the file name! The "\t" in the script tells us it is a Tab Delimited file. //OnJobStart script. Calls the data file and loads it into the job. This can reside on an external server. Allows you to update it without having to update anything in Marcom. //this rule goes into OnJobStart // Calling the XDF File for this template XDF = new ExternalDataFileEx("My-First-XDF-data.txt","\t"); // List your XDF file here return XDF.valid; The next script you need is for the data call. Treat this like any other rule in Marcom. One script (rule) per Field, unless you are doing some formatting in your script. (which this one does, if you don't want to do formatting just remove the other variables and return only one.) // Assigning text values from a text pulldown selection. if (FusionPro.inValidation) Rule("OnJobStart"); // This calls the database we set up in the Callback script Address = ""; // This declares the variables we will place in our template with this script, add or remove as necessary. City = ""; State = ""; Zip = ""; for (i = 1; i < XDF.recordCount+1; i++) // We step through the database looking at each record { PropName = XDF.GetFieldValue(i, 0); // This looks at the very first record in our database so we can compare it to the value selected in the pulldown menu in the Marcom Template. { if (Field("PulldownInMarcomTemplate") == PropName) // The Field is our FusionPro Document Pulldown, we compare the pulldown to the first field in our data { var Address = XDF.GetFieldValue(i, 1); // Assign the data to a variable. i = is the record from our counter var City = XDF.GetFieldValue(i, 2); // The number is the column in the database. Javascript starts counting columns at 0 var State = XDF.GetFieldValue(i, 3); var Zip = XDF.GetFieldValue(i, 4); } } } return Address + "<br>" + City + ", " + State + " " + Zip; // This is what is returned to the field in our template. This has formatting, so multiple variables appear in one Field. // End If you want to assign a graphic based on the same Marcom pulldown, you can use this script. // Assigning a graphic from a text match. if (FusionPro.inValidation) Rule("OnJobStart"); var Pic = NullResource(); // this should be a blank/null resource as a default for (i = 1; i < XDF.recordCount+1; i++) { PropName = XDF.GetFieldValue(i, 0); { if (Field("PulldownInMarcomTemplate") == PropName) // Compare the value of Field "PulldownInMarcomTemplate" with data { var Image = XDF.GetFieldValue(i, 7); // XDF contains image names } } } if (Image != "") { var Pic = new FusionProResource(Image, "graphic", "true"); } return Pic; I hope this helps. You can do more, but this is as far as I have gotten so far. Others may have a better approach. Good Luck.
  17. Dan, I uninstalled the old font from my system. Installed the new one. And re-loaded everything into FusionPro. Quit and re-started Acrobat and FusionPro. And if it was just one font, why is it doing it with all of my TrueType fonts. With 30 years experience working with fonts and typesetting. I do know what I am doing when it comes to fonts. Thanks.
  18. Anyone have experience with the External Data Files in Marcom? I want to try setting one up. Documentation is a bit vague.
  19. If I switched from CenturyGothic.ttf To an OpenType version (still truetype) it works. The only thing I can think of is that our type library is too old. The CenturyGothic TTF has a 1991 Copyright version 2.35. The OpenType TTF is newer. Could that be it? The old font works for all my other applications and prints fine.
  20. Dan, sorry for the delay in this, I was able to avoid the issue, but it is back. This is the CopyFitLine script I am using. Nothing Fancy. No Bold, no italic. Just the straight up font. //If Email is NOT blank, execute the following statement //If Email does not exist, return nothing if (Field("Email") != "") return CopyfitLine("", Field("Email")+ "@" +Field("emailDomain"), "Century Gothic", 9, 140, 4, true); else return ""; And says it validates in FusionPro. http://xpressfiles.printingpartners.net/valid.png Except in FusionPro, the preview shows the red line because it oversets. So it is not working. The font I am using is CenturyGothic.ttf If I switch the font to a Postscript font, anyone you want. It works. If I compose I get this error: ********* Composing record #1, input record 1 Word <joe.sample@GreystonePMC.com> does not fit in frame after line 0. The amount of text inserted into a flow exceeds the depth of all frames in the flow <>. Text is truncated. Text does not fit in the last frame on page 1 at (0.19, 1.56). ********* Which is correct, it has failed. This only happens with TrueType Fonts. The font is loaded on my Mac. It has been loaded into FusionPro. I am running FusionPro Creator 10.0.3 on a Mac.
  21. I searched and did not see this on the forum. I have text that needs to have NexPress Dimensional Ink applied to it. But I can't figure out how to get the text to Multiply. Any ideas? I have tried the overprint setting for the color, that did not work. I am not seeing a place in FusionPro to set this. Thanks, Steven
  22. Is it just me or does anyone else have issues with the copy fit rule and true type fonts? I just realized that using the bold or italic version of a truetype font and trying to copy fit that line, creates an error. But if I switch the truetype font out for a postscript font, then the script works. Did I miss a warning about truetype fonts with Fusion Pro scripts.
  23. Sorry Dan, I turned without signaling. I was thinking of another project i am working on and wanted to see if this could apply as well. I will get my IT guy to install 10 and give it a try. Thanks.
  24. Dan, No there was no error in the log at all. I ended up using the same script, but swapping out Lato Bold for Adobe Garamond Bold. Everything worked as it should have. It must be something about that font. Lato Bold is used elsewhere in the business card and it is fine. But reference it in the script and it didn't work. I wish I had a better answer.
  25. Step, It works if I remove the font reference. The whole script works, until I put in the reference to "Lato Bold", then it stops working. Dan, It never produces an error. It verifys correctly with no errors in FusionPro, even with the font reference in the script. But with the font reference in the script, when I take it into Marcom or Compose out of FusionPro, the text does not CopyFit and oversets the line. If I remove the font reference it verifys, composes and works in Marcom. If no one is seeing a problem with my code, then it has to be a font error of some kind. Since it is just a pipe character, I wonder if I switched Lato Bold out for Arial Bold or something, if it would work then.
×
×
  • Create New...