DocX icon indicating copy to clipboard operation
DocX copied to clipboard

Docx Table indent

Open Gaurav-Nayak opened this issue 6 years ago • 4 comments

How do I set indentation for the table under table properties by giving values for "Indent from left" using docx?

PF the screen shot for details capture11

Gaurav-Nayak avatar Jan 27 '19 16:01 Gaurav-Nayak

From Issue #227

Ok, I decided to look at this and have fixed the issue. This is by using the solution mentioned above and refactoring the Styles and Numbering resources to use the one generated by Word 2016.

The link below can download the binary from my branch. If you prefer you can download the entire source code and compile yourself to ensure I have not put any malicious code into it.

XCeed.Words.NET.dll

The steps below outline what I have done:

  1. Removed Resources\default_styles.xml.gz
  2. Generated word doc using nuget version of Xceed.Words.NET.dll
  3. Change the TOC as per my instructions above
  4. Saved the file
  5. Extracted the docx into a directory (it is just a specially formatted zip file)
  6. Copied the word\number.xml and word\styles.xml to the code resources folder
  7. Used Windows Subsystem for Linux to gzip the two file
  8. Ensured the Resources of the solution were correct
  9. Added new static class XceedResources
  10. Modified HelperFunctions. Table and TableOfContents to use new XceedResources static file
  11. Compiled the binary and dropped into the directory of my project that used the nuget version
  12. Ran my program and confirmed word document when opened had indented TOC

Wayne-Mather avatar Feb 02 '19 23:02 Wayne-Mather

Hi, Happy to announced that this property (Table.IndentFromLeft) will be available in v1.7. Thank you for reporting this.

XceedBoucherS avatar Oct 04 '19 19:10 XceedBoucherS

For those who wondering, what to do until 1.7 hits nuget, try to add empty invisible row in front of the table, if possible.

P.S when 1.7 will be available for free?

Norrica avatar Dec 11 '19 14:12 Norrica

Hi, Currently, v1.5 is available for Community users and v1.6 for Plus users. v1.7 is schedule for early 2020 for Plus users. v1.6 for Community users will be released at about the same time. v1.7 for the Community users will then be next in line.

XceedBoucherS avatar Dec 13 '19 13:12 XceedBoucherS