Replies: 2 comments 5 replies
-
Hello @MSKRoss, I have checked that there is a small difference between transparent and non-transparent generated XML, and thru manual XML manipulation, it should've been possible to make the text box transparent. var innerXml = textBox.SDKOpenXmlElement.InnerXml;
// Realiza a substituição da cor e preenchimento
innerXml = SrgbBgRegex().Replace(innerXml, "${1}000000${2}", 1);
innerXml = GeometryEndRegex().Replace(innerXml, "$1<a:noFill xmlns:a=\"http:https://schemas.openxmlformats.org/drawingml/2006/main\" />");
textBox.SDKOpenXmlElement.InnerXml = innerXml; The regexes: [GeneratedRegex("(</a:prstGeom>)")]
private static partial Regex GeometryEndRegex();
[GeneratedRegex("(<a:srgbClr val=\").*?(\"[\\s]*/>)")]
private static partial Regex SrgbBgRegex(); By logging the generated XML, I could check that it should have been valid, however, for some reason the library discards the change I made in the XML and returns the same XML it would have without this code. By the way, I achieved this thinking process thru opening the pptx as zip and examining the XML. I changed one manually in powerpoint to make the textbox transparent and checked the diff between both. @ashahabov I'd like to ask if there is any way I can make this change reflect perhaps in the final PPTX XML, that is generated in the slides folder. @MSKRoss If this is urgent for you, you can also try giving a pass into openxml to remove the bg after the pptx is ready, which should work, and then use the openxml generated pptx |
Beta Was this translation helpful? Give feedback.
-
I have a new PR incoming with the AddNoFill() method for Shapes. |
Beta Was this translation helpful? Give feedback.
-
I've setup a slide template with a gradient background and so I need to make sure that any text areas I create either have no Fill or have a transparent fill. When I don't specify a Fill color I get a default solid color background. When I try to specify the Alpha portion of a hex color (e.g. "FFFFFF00" with 00 as alpha), the resulting slide is "corrupted" and throws an error in PP when I load the deck. To be complete, I'd need to specify both the Fill and Border as transparent since I don't want either to be visible.
Since File Type and Alpha properties are read-only, is there some other way to get this effect? Thanks much!
Beta Was this translation helpful? Give feedback.
All reactions