We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error converting a Word with particular font in PDF document

I have a Word document (339-1-2009-0001.doc) that use a particular font (CaslonOpnface BT). When I try to convert it in a PDF document I have got a BAD result (see 339-1-2009-0001.pdf attachmet) . Only one line of a document is converted with right font (CaslonOpnface) others have a different font.

I'm using a windows application with VS2005. Can anyone help me ?



Hi Stefano,

Can you please make sure that:

1. You're using the latest version of Aspose.Pdf

2. You're explicitly specifying the required output font style

Also, please share the code which you're using to convert the doc file to pdf, so we could analyze the cause of inconsistency.


Hi, thanks a lot for our reply. I have partially solved my problem doing:

- get the latest version of Aspose,pdf

- put the following instruction in my code: pdf.SetUnicode()

But I still have problems with this document (see Test.doc/Test.pdf). The Test.pdf is not correct !
This is my code:

Private Sub Word2PDF()

Dim DocFileName As String = ""

Dim PDFFileName As String = ""

Cursor = Cursors.WaitCursor

DocFileName = System.IO.Path.GetFileName(TxtPathWord.Text)

Dim doc As Aspose.Words.Document = New Aspose.Words.Document(TxtPathWord.Text)

doc.Save("c:\temp\" & DocFileName.Replace(".doc", ".xml"), Aspose.Words.SaveFormat.AsposePdf)

Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf()

pdf.BindXML("c:\temp\" & DocFileName.Replace(".doc", ".xml"), Nothing)

pdf.IsImagesInXmlDeleteNeeded = True

PDFFileName = TxtPathPDF.Text & DocFileName.Replace(".doc", ".pdf")




Cursor = Cursors.Default

End Sub

Can you help me ?

Hi Stefano,

As I can see the output pdf has problems adjusting the table and the address image side by side. If you see the word document, you would know that the contents are not with in the default margins. I think if you adjust the contents with in the margins or you can try increasing the output width of the pdf document using Pdf.PageSetup.PageWidth class.

I hope this helps, if you still find any issues please do let us know.


Hi Stefano,

I am a developer of aspose pdf team. Thanks for your inquriy.

Please make sure the font 'CaslonOpnface BT' is installed in your PC first. Aspose.Pdf uses the default font 'Times New Roman' to replace those uninstalled fonts. If the font('CaslonOpnface BT') is installed and the result is the same, I am afraid the font is not supported yet.

Would you please attach the font file so that we could investigate the issue further?

Best regards and happy new year.

Hi shahzad,

thanks a lot for your reply. I try increasing pdf document output width using Pdf.PageSetup.PageWidth but the result is the same. I think that the best solution is to fix the marging Word document.

Best regards,