Word Document Table Borders

Home Forums WordprocessingML Word Document Table Borders

Tagged: 

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3704

    kss113
    Participant

    Hello,
    I have created a word document using C# .net and open xml.
    I am currently having 2 issues.

    1. In my code and in the document.xml file I am using the font of Arial, but when I open the document in word (using word 2016), the font is changed to Calibri.
    the text is fine it is Arial, but the dagger symbol is Calibri. And it’s like that for all the dagger symbols in the page.
    snippet of code.

    <w:p>
    						<w:pPr>
    							<w:spacing w:before="0" w:after="0" w:line="160" w:lineRule="exact" />
    							<w:ind w:left="320" w:right="540" />
    							<w:jc w:val="left" />
    						</w:pPr>
    						<w:r>
    							<w:rPr>
    								<w:rFonts w:ascii="Arial Narrow" />
    								<w:color w:val="000000" />
    								<w:sz w:val="16" />
    							</w:rPr>
    							<w:t xml:space="preserve">†</w:t>
    						</w:r>
    						<w:r>
    							<w:rPr>
    								<w:rFonts w:ascii="Arial Narrow" />
    								<w:color w:val="000000" />
    								<w:sz w:val="16" />
    							</w:rPr>
    							<w:t xml:space="preserve">Non-Independent Trustee</w:t>
    						</w:r>
    					</w:p>

    2nd issue:
    I have a table in my document also which has cell boarders, but these borders only appear when I zoom in at 110%, if I zoom to 100% the borders disappear.

    Thanks for any help or advice.
    KSS

    • This topic was modified 8 years, 2 months ago by  kss113.
    #3716

    Eric White
    Keymaster

    Hi,

    Specifying the font for a run is one of the more complex areas of Open XML WordprocessingML. There are four fonts specified for every run, and depending on the code block of the character, it uses one of the four fonts.

    The easy solution is to set the same font for all four fonts, i.e. ascii, ansi, cs, eastAsia for your run with the symbol.

    With regards to the borders disappearing, they may be too thin. Try making them thicker.

    Cheers, Eric

    #3718

    kss113
    Participant

    Hello Eric,
    I am sorry but I don’t follow your solution for the fonts.
    so in my c# code after creating the RunProperties object I should have:
    RunProperties runProperties = new RunProperties();
    runProperties.runFonts.ascii = “Arial”;
    runProperties.runFonts.ansi = “Arial”;
    runProperties.runFonts.cs = “Arial”;
    runProperties.runFonts.eastAsia = “Arial”;

    Thanks again,
    KSS

    #3719

    kss113
    Participant

    Never Mind, that is what I did, and got it working.
    I just set Ascii, HighAnsi, ComplexScript, EastAsia.
    Thanks,
    KSS

    • This reply was modified 8 years, 2 months ago by  kss113.
    #3721

    kss113
    Participant

    Hello Eric,

    With the table border, you are correct if I make the border value larger the border does show, but I am reading these border values from another file that I am using to create this word output.

    Also if I open my document, go to the table properties for the row, the boarder is set to 1/2, so if I cancel the properties window then no border, but if I click save then I do see the boarder I can even choose 1/4 border and save it and I can see it.

    Any ideas?
    Thanks again,
    KSS

    #3773

    Eric White
    Keymaster

    You probably will need to tweak the widths of the borders – if they are too thin, then make them thicker. There probably is no other solution.

    Cheers, Eric

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

You must be logged in to reply to this topic.