Jump to content

Recommended Posts

Posted

Please see code below, I have used the rule Insert a picture from file based on a database field. I have entered all the eps files by using the pathway, is it too complex maybe? Each person has a different eps background that has a specific address.

 

 

thank you for your time and help!

 

Melanie

 

var Var1 = "Location";
var Var2 = ".eps";
var Var3 = "/Volumes/Design/CREATIVE/MARCOM/CDC/Metropolitan Gastroenterology Group/CDC-MGG-DR Folder/CDC-MGG-DR.zip_1";
var Var4 = "CDC-MGG-DR-BETH.eps";



temp = '';
var_extension = ''; 
has_extension = '';

if (Var3 == "")
Var3 = Var3;
else
{
if (FusionPro.isMac)
 Var3 = Var3 + ":";
else
 Var3 = Var3 + "\\";
}

for (i=0; i<Field(Var1).length; i++)
{
temp = Mid(Field(Var1), Field(Var1).length-i,1);
var_extension = temp + var_extension;
var_extension = ToLower(var_extension);
if(var_extension == ".png" || var_extension == ".pdf" || var_extension == ".gif" || var_extension == ".eps" || var_extension == ".tif" || var_extension == ".tiff" || var_extension == ".jpg" || var_extension == ".jpeg")
{ 
 has_extension = "true";
 i=Field(Var1).length;
}
else
 has_extension = "false";
} 

if(has_extension == "true")
Pic = CreateResource(Var3 + Field(Var1), "graphic", true);

else
{
if(Var2 == ".jpg")
{ 
 Pic = CreateResource(Var3 + Field(Var1) + ".jpeg", "graphic", true);
 if (Pic.exists)
  Pic = Pic;
 else
  Pic = CreateResource(Var3 + Field(Var1) + ".jpg", "graphic", true);
}


if(Var2 == ".tif")
{ 
 Pic = CreateResource(Var3 + Field(Var1) + ".tif", "graphic", true);
 if (Pic.exists)
  Pic = Pic;
 else
  Pic = CreateResource(Var3 + Field(Var1) + ".tiff", "graphic", true);
}


if(Var2 == ".png" || Var2 == ".pdf" || Var2 == ".eps" || Var2 == ".gif")
{
 Pic = CreateResource(Var3 + Field(Var1) + Var2, "graphic", true);
 }

}

if (Pic.exists)
{
return Pic;
}

else
{
return CreateResource(Var3 + Var4, "graphic", true);
}

Posted
If you do a regular composition (not a Preview), and open the log (.msg) file, are there any messages in there related to the EPS files? Also, what versions of FusionPro, the operating system, and Acrobat are you running?
Posted
In my experience with eps files you will want to make sure the size is correct for your graphics box. I have some clients that think the eps is 2 X 1 and when it is opened in acrobat the file is 8.5 X 11 with the art down in the corner. Just an FYI from my experience.
Posted
thanks guys, yea i tried using a jpeg BC size 3.5x2 instead and it worked but the quality was not so great, so i tried next best thing, a PDF, and that works just as good as an EPS, but not sure y an eps wouldnt work when that is an option. Ill keep the sizing in mind.

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...