.net - OpenXml.WordProcessing.Justification always comes as OpenXmlUnknownElement -


i'm building table using openxml , setting justification property every cell. doesn't matter assign property, either in run element or tablecellproperty, when document open using productivity tool ms office justification element comes openxmlunknownelement. example:

tablecell tc = new tbl.tablecell(); tc.append(new tbl.tablecellproperties(new tbl.justification() { val = tbl.justificationvalues.right })); 

the text justified when converting docx file pdf, justification gone, , guess because of openxmlunknownelement issue.

edit: problem have when setting justification property on paragrahproperties paragraph, doesn't make alignment. works if paragrahproperties direct child of tablecell:

tc.appendchild<tbl.paragraphproperties>(paragraphproperties); 

but openxmlunknownelement. if append properties directly paragraph don't openxmlunknownelement doesn't make aligment @ all

you need read documentation. tablecellproperties doesn't take justification element. link

if trying align elements within cell, need put paragraphproperties.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -