How to format the constructed document?

Home Forums Open-Xml-PowerTools How to format the constructed document?

This topic contains 2 replies, has 2 voices, and was last updated by  Eric White 8 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4014

    rogersb
    Participant

    do I need to use XElement to modify the size of the items? Im looking at the open xml sdk productivity tool 2.5 from the generated item. how do I resize the items

    XElement tbl = xDoc.Root.Element(W.body).Elements(W.tbl).FirstOrDefault();

    tbl.modifyDescendants(Outline)= new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center };

    }`

    just a guess at how the part-Outline would be modified

    #4017

    Eric White
    Keymaster

    I am not completely clear on what the issue is with your markup. Are you attempting to change the markup for existing items where the size is not what you desire?

    In any case, you must not mix using XElement (LINQ to XML) with the strongly typed OM for the Open-Xml-Sdk.

    The best way to research the markup that you need to change is by creating two copies of a document, changing one slightly, and then using the Open-Xml-Sdk Productivity Tool to compare the two, highlight the differences.

    In the following screen-cast series, you can watch screen-cast #13:

    Introduction to Open XML

    Best, Eric

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.