Jump to content

IndexxPrep

Registered Users - Approved
  • Posts

    23
  • Joined

Posts posted by IndexxPrep

  1. @Hadrian,

    The only way I could get this to work for my situation was to use a graphic box method instead of the text overflow method. Because my situation had to handle files with bleed and files without bleed, this was my only option as I could not get the overflow method to center properly for all scenarios. I put the following rule in a text rule. I create a graphic box on page 1 called "Front" and another on page 2 called "Back" and I do not assign any rule or variable field to the graphic box, the rule will do that.

     

    Here is my code:

     

    FieldName = '';
    PDFfileName = '';
    pagesInPDF = 0;
    markupToReturn = '';
    pathToAllPDFs = 'Macintosh HD:Users:macuser01:Desktop:resources:'; /* change "pathToAllPDFs" value to the path where your local test files are located /*
    pathToPDF = '';
    PDFresourceRef = '';
    
    var FrontFrame = FindGraphicFrame("Front");
    var BackFrame = FindGraphicFrame("Back");
    
    //This is the main loop that parses through all of the fields for a given record.
    
    PDFfileName = Field("File");
    pathToPDF = Field("File");  /* this one should be uncommented for marcom central */
    
    /*pathToPDF = pathToAllPDFs;  //uncomment this and comment out the one above to preview on a local machine  */
    
    //Create a new resource that references this
    PDFresourceRef = CreateResource(pathToPDF ,'graphic' ,'no');
    
    //Find out how many pages it has
    pagesInPDF = PDFresourceRef.countPages;
    
    //This is the secondary loop for this script.
    //It will loop through and create markup for each page in the PDF.
    if (Field("Sides")=="1"){
    for (pageLoop = 1; pageLoop <= pagesInPDF; pageLoop++)
    {
    FrontFrame.SetGraphic('<graphic file="' + PDFresourceRef.name + '" pagenumber = "1" scale="off" />');
    return pathToPDF;
    }
    }else if (Field("Sides")=="2"){
    for (pageLoop = 1; pageLoop <= pagesInPDF; pageLoop++)
    {
    FrontFrame.SetGraphic('<graphic file="' + PDFresourceRef.name + '" pagenumber = "1" scale="off" />');
    BackFrame.SetGraphic('<graphic file="' + PDFresourceRef.name + '" pagenumber = "2" scale="off" />');
    return pathToPDF;
    }
    }
    }
    return pathToPDF;
    
    return markupToReturn;�

    Hope this helps you!

  2. Using this rule to place 8.5 x 11 PDF files that may or may not have .125" bleed. I am getting mixed results as far as the art centering in the text box. I have been using alignh and alignv with mixed results. I also noticed that in the supplied code you use position="afterline". If I remove that the horizontal positioning works perfect, however the art is top aligned in the box. I do not see any documentation on 'position' in the tag reference or user's guide. Any way to just center without scaling regardless of bleed box dimensions? See section of code below.

     

       //This is the secondary loop for this script.
       //It will loop through and create markup for each page in the PDF.
       for (pageLoop = 1; pageLoop <= pagesInPDF; pageLoop++)
       {
           markupToReturn += '<graphic file="' + PDFresourceRef.name + '" pagenumber = "' + pageLoop + '" scale="off" alignh="center" alignv="center" />';
    
           markupToReturn += '<P>';
       }
    

  3. Hi Dan,

    I have been having issues with the smallcap tag as well. Really a combination of issues, but it seems the issues I am experiencing are due to the bugs in the smallcap function. I have implemented your technique here and it works great except for one major issue. Using this smallcaps function seems to disable control of line leading. Is there anything I can do to alleviate this issue?

     

    I am having trouble getting the combination of smallcap features with correct line leading solved. I was using the <smallcap> tag and it worked ok, however I was also using <br /> characters as well and I was noticing that there were different line leadings between the lines and I could not tell why other than attributing it to the smallcap bugs. Any light you can shed on the subject would be great.

     

    Thanks!

    Indexx Prep

    FP v 7.2p1k, Intel Mac OS X 10.6, Adobe CS 5

×
×
  • Create New...