HorizontalPositionRelativeToPage

Home Forums WordprocessingML HorizontalPositionRelativeToPage

This topic contains 3 replies, has 3 voices, and was last updated by  Myname 5 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3652

    Manu_TR
    Participant

    Hello,

    Using the Word DOM, you can create any arbitrary range within a document and then call aRange.get_information(WdInformation.wdHorizontalPositionRelativeToPage) to get the horizontal position.

    Is there a way to get this property value in openxml?

    Please help!

    Thanks in Advance!
    Manu

    #3653

    Manu_TR
    Participant

    I need the value of this property similar to interop in openxml.

    Wdinformation.wdHorizontalPositionRelativeToPage

    Thanks

    #3657

    Eric White
    Keymaster

    Hi,

    This would require a layout engine, and the Open-Xml-Sdk does not contain a layout engine.

    As far as I know, there is no open source Open XML layout engine. There may be proprietary layout engines, but I have no experience with them.

    However, if I had to calculate something like this, I would first use the FormattingAssembler module in Open-Xml-PowerTools to ‘roll-up’ all of the styling information into local styling.

    Screen-Cast: Introducing the FormattingAssembler Module

    Watch the screen-cast at the bottom.

    After running FormattingAssembler, you have a new Open XML document where all styling (including positioning of the paragraph) are stored locally in the paragraph and run properties. You can then calculate positions based on the values stored in the markup.

    But this is not going to be the same as using Word automation, which takes advantage of the internal layout engine in Word.

    Cheers, Eric

    #7890

    Myname
    Participant

    You need to have a look at this site for more detailed info!

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

You must be logged in to reply to this topic.