Jump to content

inline graphic need to adjust size


Recommended Posts

I have an array rule that produces inline images based on an external data file.

 

I need to be able to proportionally scale the inline images to height="900"

 

Where and how within this rule do I control the size of the inline images?

//inline text

 

if (FusionPro.inValidation)

Rule("OnJobStart");

 

var safety1 ="";

var safety2 = "";

var safety3 = "";

var safety4 = "";

var safety5 = "";

var safety6 = "";

var icon1 = "";

var icon2 = "";

var icon3 = "";

 

 

var BootnameText = Trim(ReplaceSubstring(GetFileName(Field("PartNo")), ".pdf", ""));

var i = XDF.FindRecord(0, BootnameText);

{

if (i>0 && BootnameText != "")

 

 

{

safety1 = XDF.GetFieldValue(i, 4);

safety2 = XDF.GetFieldValue(i, 5);

safety3 = XDF.GetFieldValue(i, 6);

safety4 = XDF.GetFieldValue(i, 7);

safety5 = XDF.GetFieldValue(i, 8);

safety6 = XDF.GetFieldValue(i, 9);

icon1 = XDF.GetFieldValue(i, 14);

icon2 = XDF.GetFieldValue(i, 15);

icon3 = XDF.GetFieldValue(i, 16);

 

}

}

 

 

var counter = 0;

var fullString = "";

var usedFilled = 0;

 

CountArray = [safety1, safety2, safety3, safety4, safety5, safety6, icon1, icon2, icon3];

newTableArray = [];

 

for (i = 0 ; i < CountArray.length ; i++) {

if (CountArray != "") {

counter++;

 

var Pic = Resource(CountArray, "graphic", "true").content ; //height="900"

newTableArray[usedFilled++] = Pic + "       "

 

}

}

{

for (j = 0 ; j < newTableArray.length ; j++)

{

 

fullString += newTableArray[j]

}

 

return fullString}}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...