Free Support Forum - aspose.com

Questions regarding Aspose.Word evaluation "poisoning"

I'm evaluating Aspose.Word for use by AMP Capital Investors.

We've noticed some odd behaviour and want to know if it is due to us using the evaluation version.

First, we're getting junk special characters one line after the red evaluation message and directly before the content we insert.

Second, when we apply styles programmatically and then open the document, the text has the proper attribute (i.e. "Heading 3" is shown for the text style), but the text appears exactly the same as "normal" text.

This isn't because Heading 3 is defined to look the same as Normal. When we select the text that should look like Heading 3 and select the Heading 3 style from the dropdown, the text is formatted to the proper color, font, and size.

One more piece of context. We’re not using the default Heading 3 definition, we’ve redefined it and am reading it from an existing document:

Existing document -> Opened by Aspose.Word, Manipulated by Aspose.Word -> Saved to new document

Hi,

Thank you for evaluating Aspose.Word.

The junk characters are indeed part of evaluation watermark as described here:

http://www.aspose.com/Wiki/default.aspx/Aspose.Word/Licensing.html

But the second issue is not related to evaluation. Please attach the document and the fragment of code you use for applying the style.

Thanks for the help regarding the garbage text. Sorry for not RTFM :)

I've attached a complete C# project that demonstrates our problem. We accept as an input a doucment with a redefined Heading 2 style. When we write text as Heading 2, it has the proper style attribute but does not appear properly.

Best,

Garrertt

Sorry can’t find anything attached… Please reattach your project.

Second try...

If this doesn't work please contact me at gsmith@thoughtworks.com; I can then e-mail it to you.

This time it’s worked, thanks, looking into it.

Clear. You should simply apply style to paragraph instead of font:

builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading2;