Jump to content

Text Box, "Align Bottom" and Tables.


BAndreas

Recommended Posts

Hello once again..

 

I have another business card that utilizes a table to adjust the length of a left and right rule line depending on the amount of fields used. I would like the content of that table to align itself to the bottom of the card. I have selected "vertical align bottom" in the text frame palette, but the table remains centered (vertically) within the box. I have also tried alignv="bottom" within the tag but still no result?????? :(

 

Image: Would like the copy on "B" to align like "A"

 

http://www.acegroupnyc.com/cms_acegroup/forums/009Problem.jpg

 

http://www.acegroupnyc.com/cms_acegroup/forums/009Problem2.jpg

 

function AddRow(FieldName, Label)

{

try

{

if (Field(FieldName))

return "\n <row><cell>" + "<color name=\"" + Field("Color") + "\">" + (Label || FieldName + ":") + "</color>" +'<t>' + Field(FieldName);

}

catch (e) {}

return "";

}

 

function AddAddress(FieldName)

{

try

{

if (Field(FieldName))

return "\n <row><cell>" + Field(FieldName);

}

catch (e) {}

return "";

}

 

var myTable = '<table columns=1 alignv="bottom" boxrules="Left:thin,Black;Right:thin,Black" alignv="bottom" margins="top:9;bottom:9;left:5">'

myTable += '\n <column width=9000>'

 

myTable += AddAddress("Address1");

myTable += AddAddress("Address2");

myTable += AddAddress("City") + "," + " " + ("State") + " " + ("Zipcode") + '<br>';

myTable += AddRow("T");

myTable += AddRow("F");

myTable += AddRow("M");

 

myTable += '\n</table>';

return myTable;

Link to comment
Share on other sites

  • 5 months later...

Tables, repeatable components, and inline graphics are kind of special cases in text composition, and many of the rules which apply to "regular" text don't apply to them in quite the same way. One aspect of this problem is that vertical alignment in a text frame is thrown off if any of these items is the very last thing in the text.

 

However, you can work around this by adding a very small amount of text after the table. Add this right at the end of your rule, before the "return" line:

myTable += '<p leading=1> '

Link to comment
Share on other sites

  • 1 year later...

I am having a problem trying to align an inline graphic. I am using a multiple page pdf and I need the pdf to fill the pages and if there are bleeds it must accommodate for those as well. Here is the code that I am using for placing the pdfs:

var result = "";
var counter = 0;


for (item=01;item<2;item++)
     {

           if (Field("Doc1")!="")
           {
               counter++;
               var Pic = new FusionProResource(Field("Doc1"), "graphic", "true");
               for (Pic.pagenumber = 1; Pic.pagenumber <= Pic.countPages; Pic.pagenumber++) 

               if (Pic.pagenumber == Pic.countPages)
                   {
                       result += Pic.content;
                   }
               else 
                   {
                       result += Pic.content+"<p>";
                   }
       } // itemlen

     }  // for item

return result ;

I need the pdfs to align center vertically, but they are aligning top vertically. The horizontal center align is working.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...