sandigcustomprinters.com Posted April 10, 2012 Share Posted April 10, 2012 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 More sharing options...
ThomasLewis Posted April 10, 2012 Share Posted April 10, 2012 Have you tried using the <graphic> tag? It has a width and height attribute. It seems like it would work in this case. Link to comment Share on other sites More sharing options...
sandigcustomprinters.com Posted April 10, 2012 Author Share Posted April 10, 2012 I am struggling on where to add this "height="900"> tag. I cannot seem to get the inline graphic to recognize it. Link to comment Share on other sites More sharing options...
ThomasLewis Posted April 10, 2012 Share Posted April 10, 2012 What I meant is just write it instead like this: if (CountArray != "") { counter++; newTableArray[usedFilled++] = '<graphic file="' + CountArray + '" height="900">' + " " } Link to comment Share on other sites More sharing options...
sandigcustomprinters.com Posted April 11, 2012 Author Share Posted April 11, 2012 That's it. Thanks a bunch!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.