Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 29th, 2017, 02:05 PM
Landisa's Avatar
Landisa Landisa is offline
Junior Community Member
 
Join Date: Jun 2014
Location: United States
Posts: 31
Default Text Color Not Changing

I really didn't want to post this but after hours of searching I couldn't find a reason.

I have two templates that use this code. One of the templates refuses to turn the text of the table white.

I have:
  • Made the made Variable in the Text Frame as White text
  • I have edited my Table rule so both outcomes show as White
  • I have edited the outcome for other variables other than "RED" and they work
  • I have rewritten the code so not RED would be Black
  • Tried seeing if it composed properly even if preview was bad (didn't work)

However, no matter what I have done the code still shows black text on a dark colored background. Here is my code:

Code:
var tbl = [];
var myTable = new FPTable;
myTable.AddColumns(3000, 3000, 3000, 3000, 3000);

if (Field("RUN COLOR") == "RED")
{
    //Formatting the table
    for (var i=0; i<2; i++)
    {
        var row = myTable.AddRow();
        var cell = row.Cells[0];
        
        cell.Margins = new FPTableMargins;
        cell.Margins = {Bottom: 0, Top: 0, Left: 0, Right: 0};

        //cell.SetBorders("Thin", "Black", "Top", "Right", "Bottom", "Left");
        cell.HAlign = "Right";
        cell.VAlign = "Bottom";
        cell.TextColor = "White";
        row.CopyCells(0,1,2,3,4);
        row.minHeight = 800;
    }
}
else
{
    //Formatting the table
    for (var i=0; i<2; i++)
    {
        var row = myTable.AddRow();
        var cell = row.Cells[0];
        
        cell.Margins = new FPTableMargins;
        cell.Margins = {Bottom: 0, Top: 0, Left: 0, Right: 0};

        //cell.SetBorders("Thin", "Black", "Top", "Right", "Bottom", "Left");
        cell.HAlign = "Right";
        cell.VAlign = "Bottom";
        cell.TextColor = "Black";
        row.CopyCells(0,1,2,3,4);
        row.minHeight = 800;
    }
}

//Insert Data into Rows
myTable.Rows[0].SetContents("<color name=\"White\">" + Field("BOX09"), Field("BOX07"), Field("BOX05"), Field("BOX03"), Field("BOX01")); //Row 1
myTable.Rows[1].SetContents(Field("BOX10"), Field("BOX08"), Field("BOX06"), Field("BOX04"), Field("BOX02")); //Row 2

BoxSet = myTable.MakeTags().replace(/^\<table/, "<table alignment=right");

return BoxSet;
If it is helpful to know this code slightly varies from the other template that does work. Here is that code:

Code:
var tbl = [];
var myTable = new FPTable;
myTable.AddColumns(3100, 3100, 3100, 3100);

if (Field("RUN COLOR") == "RED")
{
    //Formatting the table
    for (var i=0; i<3; i++)
    {
        var row = myTable.AddRow();
        var cell = row.Cells[0];
        
        cell.Margins = new FPTableMargins;
        cell.Margins = {Bottom: 0, Top: 0, Left: 0, Right: 0};

        //cell.SetBorders("Thin", "Black", "Top", "Right", "Bottom", "Left");
        cell.HAlign = "Right";
        cell.VAlign = "Bottom";
        cell.TextColor = "White";
        row.CopyCells(0,1,2,3);
        row.minHeight = 1200;
    }
}
else
{
    //Formatting the table
    for (var i=0; i<3; i++)
    {
        var row = myTable.AddRow();
        var cell = row.Cells[0];
        
        cell.Margins = new FPTableMargins;
        cell.Margins = {Bottom: 0, Top: 0, Left: 0, Right: 0};

        //cell.SetBorders("Thin", "Black", "Top", "Right", "Bottom", "Left");
        cell.HAlign = "Right";
        cell.VAlign = "Bottom";
        cell.TextColor = "Black";
        row.CopyCells(0,1,2,3);
        row.minHeight = 1200;
    }
}

//Insert Data into Rows
myTable.Rows[0].SetContents(Field("BOX10"), Field("BOX07"), Field("BOX04"), Field("BOX01")); //Row 1
myTable.Rows[1].SetContents(Field("BOX11"), Field("BOX08"), Field("BOX05"), Field("BOX02")); //Row 2
myTable.Rows[2].SetContents(Field("BOX12"), Field("BOX09"), Field("BOX06"), Field("BOX03")); //Row 3

BoxSet = myTable.MakeTags().replace(/^\<table/, "<table alignment=right");

return BoxSet;
If someone could just guide me to what is causing this issue of being black all the time regardless of the Rules or what is set in the Text Frame, I would appreciate it.

It may be possible I am just missing something small but it absolutely does not change to White if the background frame is Red.
__________________
Audra Landis
Computer Systems Admin

VDP Producer v10.0.3
Windows 7 / Windows 10
Acrobat Pro DC (2015.010.20056)
Reply With Quote
  #2  
Old August 29th, 2017, 03:08 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,381
Default Re: Text Color Not Changing

The first question I always ask in situations like this is, are there any messages about colors in the composition log (.msg) file?

The next thing is, try looking at the actual tags generated. I would add this line right before the ending "return BoxSet" line:
Code:
Print(BoxSet);
Then look in the .msg file to see whether the tags look right.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});

Last edited by Dan Korn; August 29th, 2017 at 06:03 PM..
Reply With Quote
  #3  
Old August 30th, 2017, 08:06 AM
Landisa's Avatar
Landisa Landisa is offline
Junior Community Member
 
Join Date: Jun 2014
Location: United States
Posts: 31
Default Re: Text Color Not Changing

Quote:
Originally Posted by Dan Korn View Post
The first question I always ask in situations like this is, are there any messages about colors in the composition log (.msg) file?
I am not sure I understand the message in the box but I see this for all of the records and the only one not composing correctly are on Sheet #6
Code:
Composing record #54, input record 54
    Sheet #6, record #1
No value associated to graphic copyhole <SetGraphic_Temp_1> in record 54.
Quote:
Originally Posted by Dan Korn View Post
The next thing is, try looking at the actual tags generated. I would add this line right before the ending "return BoxSet" line:
Code:
Print(BoxSet);
Then look in the .msg file to see whether the tags look right.
This seems to help a bit more when compared to the other template that works the output code is identical. Here is the code snippet on the area that is still showing black:
Code:
Composing record #54, input record 54
    Sheet #6, record #1
No value associated to graphic copyhole <SetGraphic_Temp_1> in record 54.
<table alignment=right columns=5>

[SNIPPED]

<cell margins=Top:0;Bottom:0;Left:0;Right:0>
<p br=false quad="R"><p br=false cellalignment="Bottom">
<span><color name="White">125</span>
So yeah the tag definitely looks correct. This is the number that is showing up black when it needs to be white.

If you want I can always attach the .msg files if you think it will help.
__________________
Audra Landis
Computer Systems Admin

VDP Producer v10.0.3
Windows 7 / Windows 10
Acrobat Pro DC (2015.010.20056)
Reply With Quote
  #4  
Old August 30th, 2017, 09:14 AM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,381
Default Re: Text Color Not Changing

Quote:
Originally Posted by Landisa View Post
I am not sure I understand the message in the box but I see this for all of the records and the only one not composing correctly are on Sheet #6
Code:
Composing record #54, input record 54
    Sheet #6, record #1
No value associated to graphic copyhole <SetGraphic_Temp_1> in record 54.
Well, that's not a message about colors. You probably have a call to FindGraphicFrame that's not actually setting a graphic in the frame. Anyway, that message is benign.
Quote:
Originally Posted by Landisa View Post
This seems to help a bit more when compared to the other template that works the output code is identical. Here is the code snippet on the area that is still showing black:
Code:
Composing record #54, input record 54
    Sheet #6, record #1
No value associated to graphic copyhole <SetGraphic_Temp_1> in record 54.
<table alignment=right columns=5>

[SNIPPED]

<cell margins=Top:0;Bottom:0;Left:0;Right:0>
<p br=false quad="R"><p br=false cellalignment="Bottom">
<span><color name="White">125</span>
So yeah the tag definitely looks correct. This is the number that is showing up black when it needs to be white.
That does seem like the correct tag. Are you sure that corresponds to the output? Could there be another table cell with the same number?

Perhaps you have tag such as <span color=Black> outside of the table, which is keeping the color fixed. I would try moving the table to another frame.

I would also try reducing the problem to a minimal example; for instance, does a simple table with a single cell have the same problem? If not, try adding the rest back in until you find what triggers it.
Quote:
Originally Posted by Landisa View Post
If you want I can always attach the .msg files if you think it will help.
Well, the log file is great, but I'm still looking at this through a keyhole. If you want to attach the collected job, I might be able to look at it.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #5  
Old August 30th, 2017, 11:06 AM
Landisa's Avatar
Landisa Landisa is offline
Junior Community Member
 
Join Date: Jun 2014
Location: United States
Posts: 31
Default Re: Text Color Not Changing

Quote:
Originally Posted by Dan Korn View Post
That does seem like the correct tag. Are you sure that corresponds to the output? Could there be another table cell with the same number?

Perhaps you have tag such as <span color=Black> outside of the table, which is keeping the color fixed. I would try moving the table to another frame.

I would also try reducing the problem to a minimal example; for instance, does a simple table with a single cell have the same problem? If not, try adding the rest back in until you find what triggers it.

Well, the log file is great, but I'm still looking at this through a keyhole. If you want to attach the collected job, I might be able to look at it.
Dan, I wasn't sure what part would help you the best so I have attached the complete composition folder. I did find and correct the graphic frame issue.

I will try removing rows and cells to reduce the number of possibilities.
I have tried deleting and rebuilding the Text Frame without success.
Attached Files
File Type: zip 1504112274.zip (6.29 MB, 5 views)
__________________
Audra Landis
Computer Systems Admin

VDP Producer v10.0.3
Windows 7 / Windows 10
Acrobat Pro DC (2015.010.20056)
Reply With Quote
  #6  
Old August 30th, 2017, 11:56 AM
Leosmith Leosmith is offline
Junior Community Member
 
Join Date: Jun 2015
Location: Saint Paul
Posts: 41
Default Re: Text Color Not Changing

added </span> to FORMAT_agency rule and it seems to give the results your looking for.
Leo

Quote:
if (Field("RUN COLOR") == "RED")
{
return "<span color=\"White\">" + Field("AGENCY") + '</span>';
}
else
{
return Field("AGENCY");
}
__________________
Leo Smith - Novice
FusionPro VDP Creator 10
Adobe Pro CC
Windows 7
Reply With Quote
  #7  
Old August 30th, 2017, 12:00 PM
Landisa's Avatar
Landisa Landisa is offline
Junior Community Member
 
Join Date: Jun 2014
Location: United States
Posts: 31
Default Re: Text Color Not Changing

Quote:
Originally Posted by Leosmith View Post
added </span> to FORMAT_agency rule and it seems to give the results your looking for.
Leo
*facepalm*
I didn't even think to check to see that the other code was working properly.

Thanks! ^^,
__________________
Audra Landis
Computer Systems Admin

VDP Producer v10.0.3
Windows 7 / Windows 10
Acrobat Pro DC (2015.010.20056)
Reply With Quote
Reply

Tags
color, rule, table, text

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 02:14 AM.


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