Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > Getting Started > Sample Jobs

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 10th, 2012, 12:33 PM
sandig@customprinters.com sandig@customprinters.com is offline
Regular Contributor
 
Join Date: Feb 2010
Posts: 62
Default inline graphic need to adjust size

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[i] != "") {
counter++;

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

newTableArray[usedFilled++] = Pic + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"

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

fullString += newTableArray[j]
}

return fullString}}

Reply With Quote
  #2  
Old April 10th, 2012, 01:28 PM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 206
Default Re: inline graphic need to adjust size

Have you tried using the <graphic> tag? It has a width and height attribute. It seems like it would work in this case.
Reply With Quote
  #3  
Old April 10th, 2012, 02:12 PM
sandig@customprinters.com sandig@customprinters.com is offline
Regular Contributor
 
Join Date: Feb 2010
Posts: 62
Default Re: inline graphic need to adjust size

I am struggling on where to add this "height="900"> tag. I cannot seem to get the inline graphic to recognize it.
Reply With Quote
  #4  
Old April 10th, 2012, 03:30 PM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 206
Default Re: inline graphic need to adjust size

What I meant is just write it instead like this:

Quote:
if (CountArray[i] != "")
{
counter++;
newTableArray[usedFilled++] = '<graphic file="' + CountArray[i] + '" height="900">' + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
}
Reply With Quote
  #5  
Old April 11th, 2012, 06:16 AM
sandig@customprinters.com sandig@customprinters.com is offline
Regular Contributor
 
Join Date: Feb 2010
Posts: 62
Default Re: inline graphic need to adjust size

That's it. Thanks a bunch!!!
Reply With Quote
Reply

Tags
graphic, height, image size, inline

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.