Jump to content

mjlongo

Registered Users - Approved
  • Posts

    50
  • Joined

Posts posted by mjlongo

  1. I think I resolved the issue. I added the following to the code:

     

    ].filter(function(s){return s[1]}).map(
           function(s){
               return '<p br=false superoffset=70 superratio=100>' + s[1] + '<superscript> ' + s[0] + '</superscript>';
       })[color="Red"].join('<t>')[/color]
    

     

    Then, edited the size of the tab stops on the text frame to an appropriate size.

     

    That worked for me. Having said that, any other suggestions would be great for the benefit of others. Thanks!

  2. Hello,

     

    I am using a script suggested from another thread called "floating images". The script works perfect except for one thing, it adds commas and I want to suppress them. The following is my script:

     

    var cellImg = Resource("cell").content;
    var voiceImg = Resource("voice").content;
    var faxImg = Resource("fax").content;
    var emailImg = Resource("email").content;
    
    var numbers = [
       [Field('EMAIL'), emailImg],
       [Field('PHONE'), voiceImg],
       [Field('CELL'), cellImg],
       [Field('FAX'), faxImg]
       ].filter(function(s){return s[1]}).map(
           function(s){
               return '<p br=false superoffset=70 superratio=100>' + s[1] + '<superscript> ' + s[0] + '</superscript>';
       })
    
    return numbers;

     

    As I stated above, the script works fine but the output includes commas between each element. I do not want those commas. Just removing the commas between each element after the ']' results in errors. Can someone assist me with how I go about suppressing the commas?

     

    Thanks!

    -Mike

  3. Step, thank you for that response. That sets me off in the right direction. I did run into one problem however.

     

    The enabledPages variable that is being set at the beginning does not seem to want to take in the field. for example, I was looking to do something like this:

     

    enabledPages = [field("record number"), 101]

     

    So that page "record number" (maybe equals 1) would be the valid page for that record as well as page 101. The next record in the document might end up calling out page 5 and so on.

     

    I hope that makes sense.

  4. Hello, our customer will be providing a document to use that may contain 100's or 1000's of pages. The job will require that only select pages as well as a separate variable page will be used for each record. Is there a way to quickly set all of the pages to unused? I certainly will not want to go mark every page as unused manually. Thanks!
  5. Hello, I'm trying to create basically a mailing label sheet from a list of about 1000 records or so. There are six labels on the sheet. How do I get the records to flow to each text box? IE: have records 1 though 6 fill the txt boxes, then 7 through 12, and so forth. Right now of course, only record 1 appears in each text box. Thanks!
  6. Thank you for the reply STEP. I will give your suggestions a try on another test card to see if I can streamline the process.

     

    At the moment, I got the card to work with some changes to the script. I had to employ the "CreateResource" methods as described earlier. The remaining issues are now with MarcomCentral (the crop tool in particular) and I am working with their support team on those issues.

     

    Thanks!

  7. Thank you for the response. Your suggestion of using the "resource" worked when I replace the lines you mention and compose the document. However, when I upload the document and place it on MarcomCentral where someone can upload the images backs, it fails to work. The card will not apply the uploaded image and/or in some cases, it is using the resource from the library of images.
  8. Hello,

     

    I have a business card that allows a customer to upload anywhere from one to five different images for the back of the card. I have created a fusion pro document that contains the front of the card then back one, the front of the card then back two, etc for a total of ten pages.

     

    For each of the 5 backs of the cards, I have created an image box that covers the entire back. Each one of these graphic boxes are labeled "Graphic1", "Graphic2", "Graphic3", etc.

     

    In the same folder as my fusionPro document, I have five sample graphic files. They are all named "sample1.jpg", "sample2.jpg", etc. Each graphic file is assigned a matching resource within the fusion pro document. For example I have a resource called image1 that is assigned sample1.jpg, etc for all five resources.

     

    So, this is what I am trying to do: If a customer uploads just one image file, I want that file to be applied to all backs . If a customer uploads image 1 and then uploads image 2, I want image 1 to stay on back 1 but then image 2 should apply to backs 2,3,4 and 5. Likewise if a customer uploads image 1, image 2 and then image 3. I want image 1 on back 1, image 2 on back 2 and then image 3 on backs 3,4 and 5. And so forth. Note that there will be a default image if nothing is uploaded at all.

     

    To accomplish this, I have been trying to get the following script to work. The script is inside an OnRecordStart.

     

     

    var frame1 = FindGraphicFrame("Graphic1");
    var frame2 = FindGraphicFrame("Graphic2");
    var frame3 = FindGraphicFrame("Graphic3");
    var frame4 = FindGraphicFrame("Graphic4");
    var frame5 = FindGraphicFrame("Graphic5");
    
    frame1.SetGraphic(Field("Image1"));
    frame2.SetGraphic(Field("Image1"));
    frame3.SetGraphic(Field("Image1"));
    frame4.SetGraphic(Field("Image1"));
    frame5.SetGraphic(Field("Image1"));
    
    
    if (Field("Image2") != "")
       {
           frame2.SetGraphic(Field("Image2"));
           frame3.SetGraphic(Field("Image2"));
           frame4.SetGraphic(Field("Image2"));
           frame5.SetGraphic(Field("Image2"));
       }
    
    if (Field("Image3") != "")
       {
           frame3.SetGraphic(Field("Image3"));
           frame4.SetGraphic(Field("Image3"));
           frame5.SetGraphic(Field("Image3"));
       }
    
    if (Field("Image4") != "")
       {
           frame4.SetGraphic(Field("Image4"));
           frame5.SetGraphic(Field("Image4"));
       }
    
    if (Field("Image5") != "")
       {
           frame5.SetGraphic(Field("Image5"));
       }
    

     

     

    The problem is, that it is just not working. I am getting blank pages. I am also getting the following errors on compose: "Graphic is not found or is not processed properly: image1". That error appears for each graphic resource. I do not have that error if I omit the script and then place "image1" resource directly into the graphics box. Therefore I cannot see why there would be an issue finding the resource. Should I be placing the images in some other location?

     

    I'm also curious to see if there may be some better ideas or solutions to this type of business card and what I'm trying to do. I'm open to any and all ideas.

     

    Thanks!

  9. I'm not sure why you don't just apply the OnCopyfit callback function to the entire frame. It sounds like you're trying to copyfit the entire contents of the frame anyway.

    Because I don't know anything about the OnCopyfit callback function! :) What does that function do compared to the function I am attempting here? All I want is for the LastName to adjust it's font size so that a long last name fits into the text frame.

     

    You might want to double-check the Text Frame editor and verify that the width is exactly 1''. Sometimes those numbers jump around by a tiny bit (for me anyway).

    I checked. It's one inch.

     

    Dropping what point size down? The size of the text frame? If your frame is 72 points like you say it is, do you have a 8pt text inset applied to the frame? You'd have to account for that as well.

    Dropping that 72 down from 72 to 55 within the code made the script "work".

    I have no idea what you mean by the 8pt text inset. Can you explain that?

     

    I will try to name the text frame box. I know I did not have that named.

  10. Hello,

     

    I'm working with a test document trying to get the copyfitline to work and I am getting unexpected results.

     

    FusionPro version: 9.3.6

     

    I created a text box exactly 1 inch wide therefore point size should be 72.

     

    I first placed the LastName field in the box (no rule used) with data that contains long last names. I determined that 12 point font works fine for the shorter names and the long names do not fit. Then I reduced the font point size to 7 and tested that the long names will fit at that size.

     

    I then built the copy fit rule and applied it to the same text box:

     

    return CopyfitLine("", Field("LastName"), "Helvetica", 12, 72, 7, false);

     

    However, the long last names absolutely will not reduce/fit into the frame unless I start dropping the point size down. I have to get down to around 55 before the last name will actually reduce. I have no idea why this is.

     

    I also attempted to try applying GetsettableTextWidth lines to the rule in order to auto find the frame size but this didn't work either.

     

    var mywidth = GetSettableTextWidth(FindTextFrame(FusionPro.Composition.CurrentFlow.name))/100;
    return CopyfitLine("", Field("LastName"), "Helvetica", 12, mywidth, 7, false);

     

    Tried this with a span tag as suggested in another post as well but it still didn't work:

     

    var mywidth = GetSettableTextWidth(FindTextFrame(FusionPro.Composition.CurrentFlow.name))/100;
    return "<span accumulate=false>" + CopyfitLine("", Field("LastName"), "Helvetica", 12, mywidth, 7, false) + "<span>";

     

    Any ideas why the point size is not working in this case? Are there other boxes that need to be checked? I tried to both select and unselect the "Re-Evaluate..." and "Treat returned…" boxes to no avail.

     

    Thanks!

  11. I'm trying to use a Garamond type font in Fusion pro like this

     

    <f name="Adobe Garamond Pro">

     

    The problem is that the quote characters are showing up graphically as straight vertical lines when they are supposed to look like curves. Testing this same font in Microsoft Word, the font looks correct. In FusionPro, the font is incorrect.

     

    Also, I'm using a FreeScript font. In Microsoft word, the apostrophe character shows up fine. In FusionPro, the apostrophe will not appear at all.

     

    Finally, is there a way to control the margin around graphical resources? It seems as those I am getting too much top margin around a graphic.

     

    Thanks!

  12. I did some searching here but I could not find an example. Only some reference to this approach.

     

    I have a postcard job that requires the customers name be printed using a text with special effects like inner and outer glow, shadows, etc. We plan to create this alphabet of graphics in photoshop or whatever then use these to replace each letter in the persons name.

     

    I have a rough idea of how I might approach this in Javascript but I was wondering if someone already has some working script that I could leverage to replace each character of the string with the corresponding graphic.

     

    Thanks!

  13. I have a series of coupons that are printed using some rules. The bottom of the coupons print a disclaimer that needs to be equal right-left justified and after the disclaimer is a "code: ***" that needs to be right justified.

     

    I am able to display the disclaimer paragraph without any issue using code that looks like this:

     

    '<z newsize="7"><p quad="J">All of the text for the disclaimer paragraph';

     

    If I do not print a "code: ***" line, the disclaimer paragraph will format nicely with the whole paragraph equal justification on each line and the remainder last line left justifies as expected.

     

    The problem comes in when I add the "code: ***" line and it needs to be right justified. Note that this line must come after the disclaimer paragraph.

     

    I add the following line:

     

    <z newsize="8"><p quad="R"><b>Code: + field("code") + '</b>';

     

    and the "code: ***" line will appear on the same line as the last line of the disclaimer paragraph. Which I cannot have.

     

    If I add a <br> at the end of the disclaimer paragraph, then the last line of the disclaimer will add too much space because it now wants to fully justify the last line.

     

    Any ideas?

  14. Hello,

     

    I have a job where I want some text to justify on the right followed by some text justified on the left. I cannot get this to work without having 1 line spaced between them.

     

    My code is similar to this:

     

    info += '<p quad=R>' + Field("field1") + <br> + Field("field2");

    info += '<p quad=L>' + Field("field3");

     

    The problem is that I get a full line space between the fields 1 and 2 on the right and the field 3 on the left. I absolutely do not want that space.

     

    Any tips?

×
×
  • Create New...