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 Sep 12, 2011 12:26 pm


I want to create PDF document but all symbols used in document disappear after saving as PDF.

My code:

var document = new Document();
var section = document.AddSection();

var p = section.AddParagraph();
p.Text = "Symbol should be here:";

var s = p.AppendSymbol(254);
s.FontName = "Wingdings";
document.SaveToFile(@"c:\test.pdf", FileFormat.PDF);
document.SaveToFile(@"c:\test.docx", FileFormat.Docx);

Docx document is saved properly.
But unfortunately PDF document contains only "Symbol should be here:" without symbol i wanted.

I need to generate word and PDF documents with symbols.
What can I do to solve this problem ?

Posts: 2
Joined: Tue Sep 06, 2011 1:43 pm

Tue Sep 13, 2011 12:08 pm


var paragraph = section.AddParagraph();
paragraph.Text = "Symbol should be here:";

TextRange r = new TextRange(paragraph.Document);
r.Text = ((char)254).ToString();
r.CharacterFormat.FontName = "Wingdings";


Now PDF document contains symbol I wanted.

The key is not to use Spire.Doc.Fields.Symbol class, but I think it's bug in Spire.Doc.

Posts: 2
Joined: Tue Sep 06, 2011 1:43 pm

Wed Sep 14, 2011 6:43 am


Thanks for your solution and feedback.
We provided method AppendSymbol to provide to add special symbo of word into doc file. But we implemented the same function in TextRange. So the symbo data is missed during convertion.
We will fix this bug or remove the mthod AppendSymbol in the future version.
Technical Support / Developer,
e-iceblue Support Team
User avatar

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

Return to Spire.Doc