Footer text showing in grey colour in Visio

Hi

In Aspose Diagrams for Java,we are using the following code snippet for inserting the footer text in Visio documents

diagram = new Diagram(fileDir + File.separator + fname);
			//	Date date = new Date();
			//	diagram.getHeaderFooter().setFooterCenter(footerText + date + footerText1);
			diagram.getHeaderFooter().setFooterCenter(footerText + formattedDate + footerText1);
			diagram.getHeaderFooter().setHeaderFooterColor(com.aspose.diagram.Color.getRed()); 
			// Important - to have to change to VSDX,VSD,VSS formats after verification

We are using the licensed version of Aspose. The footer text is showing in grey colour.

As you can see in the snippt,we are already setting the colour of the footer text to red in the code. The footer text is still not showing in red colour, can you help?

Thanks

@Rama_Menon

Cause

The issue you’re experiencing with the footer text appearing in grey instead of the specified red color is likely due to existing styles or settings in the Visio document that are overriding your specified color.

Solution

To ensure that the footer text color is applied correctly, follow these steps:

  1. Check for Existing Styles: Verify that there are no existing styles in the Visio document that might be overriding your color settings.

  2. Set the Color After Adding the Footer: Ensure that you set the footer color after adding the footer text to guarantee that the color setting takes effect.

  3. Use the Correct Color Object: Confirm that you are using the correct color object for the footer. You may want to try a different method to set the color.

Code

Here’s a modified version of your code snippet that ensures the footer color is set after adding the footer text:

// Load the diagram
Diagram diagram = new Diagram(fileDir + File.separator + fname);

// Set the footer text
diagram.getHeaderFooter().setFooterCenter(footerText + formattedDate + footerText1);

// Set the footer color to red
diagram.getHeaderFooter().setHeaderFooterColor(com.aspose.diagram.Color.getRed());

// Save the diagram
diagram.save(fileDir + File.separator + "Updated_" + fname, SaveFormat.VSDX);

Next Steps

  1. Test the modified code to see if the footer text color appears correctly.
  2. If the issue persists, check the document’s styles to ensure that no other settings are affecting the footer text color.
  3. If you continue to face issues, please share a sample document for further investigation.

I am confident that these steps will resolve the issue. Please let me know if you need any further assistance!

@Rama_Menon
Thanks for the sample code.
After an initial testing, I am able to reproduce the issue as you mentioned .
The colors of footer text display correctly when saved in .vsdx and .pdf formats, but they become inaccurate when saved as a .vsd file.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMJAVA-51268

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as DIAGRAMJAVA-51268) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou