Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set special characters to the document's default font. #54

Closed
eliseudev opened this issue Oct 26, 2022 · 2 comments
Closed

Set special characters to the document's default font. #54

eliseudev opened this issue Oct 26, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@eliseudev
Copy link

eliseudev commented Oct 26, 2022

Hello, I wanted to know if there's a way to set the default font for special characters for example, I put the default font in the "Segoe UI" document, but when it has a special character it stays with the "Calibri" font, how can I adjust it? Note, the font supports special characters. (follow the prints)

image






image

@PrzemyslawKlys
Copy link
Member

Can you provide some "code" that will generate this, so I can do testing and provide options?

@PrzemyslawKlys PrzemyslawKlys added the enhancement New feature or request label Oct 26, 2022
@eliseudev eliseudev reopened this Oct 26, 2022
@eliseudev
Copy link
Author

eliseudev commented Oct 26, 2022

Can you provide some "code" that will generate this, so I can do testing and provide options?

using (WordDocument document = WordDocument.Create(filePath))
                {
                    document.Settings.Language = "pt-Br";

                    string title = "INSTRUMENTO PARTICULAR DE CONSTITUIÇÃO DE GARANTIA DE\r\nALIENAÇÃO FIDUCIÁRIA DE IMÓVEL\r\n";

 document.AddParagraph(title).SetBold().ParagraphAlignment = JustificationValues.Center;
document.Save();

that's just the title, I need to adjust it in every document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants