Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Mon Jul 02, 2012 9:53 pm

Hello:

I imagine Spire is a way off from supporting the rendered text options in Word 2010 (allowing for drop shadow, etc).
This can mostly be worked around by making that styled text an embedded image.

However, I've encountered a bug (or more of a behavior) that is causing me a bit of a headache.

When you're using a rendered text/font in word, it still retains the "base" font when loading it into Spire. However, since these fonts are rendered, Word is able to support styles not included in a particular font.
For example, Harlow Solid Italic does not include a Bold version of it's font, but Word is able to render it in a way that accommodates this.

Unfortunately, loading such a document with Spire throws an exception because the font as installed in the system directory isn't a "boldable" one. The font loader API built into .Net throws an invalid argument exception.

I propose one of a couple of things:
1) In the case Spire cannot find a font style specified in the word document, fall back to the "normal" style.
2) Introduce a property that controls whether the exception occurs or #1 is done instead (which would allow backward compatible behavior in case any one else out there is depending upon that exception for something)

I've included a docx file that illustrates the exception. You just need to load it with the Document object constructor to throw it.
You do not have the required permissions to view the files attached to this post.

dan@nationalparalegal.edu
 
Posts: 6
Joined: Thu Jun 21, 2012 12:00 am

Mon Jul 02, 2012 10:41 pm

Oops.. I guess to clarify after a further test, Harlow only supports Italic.

So the font loader fails there too if you remove all styling on it.

The proper way to implement #1 I described above, would be to use what ever is available, but favor "regular" when possible.

dan@nationalparalegal.edu
 
Posts: 6
Joined: Thu Jun 21, 2012 12:00 am

Tue Jul 03, 2012 10:13 am

Hi,

Sorry for this inconvenience caused by us.
We will try to implement #1 as your description as soon as possible, and then, we will inform you.
Harry
Technical Support / Developer,
e-iceblue Support Team
User avatar

harry.support
 
Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Wed Jul 04, 2012 1:18 am

Thank you Harry. I look forward to the update.

dan@nationalparalegal.edu
 
Posts: 6
Joined: Thu Jun 21, 2012 12:00 am

Fri Jul 06, 2012 6:48 am

Hi,

About the problem, we have fix it in Spire.Doc Pack Version:4.4. You can download it: http://www.e-iceblue.com/Download/download-word-for-net-now/spire-doc-v44.html. If you still have any problems, please contact us!
Nancy
e-iceblue support team
contact: nancy.wang@e-iceblue.com
User avatar

nancy
 
Posts: 51
Joined: Wed May 30, 2012 2:02 am

Return to Spire.Doc