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

Free Support Forum - aspose.com

Document.Print. Alright Sans Light outputting non alpha-numeric characters

As per the title. All text trying to use regular Alright San Light just looks a mess. Doing a Document.Save to pdf renders fine. I’ve tried setting the font directory to point it to the right location but to no avail. The documentation seems a bit out of date on the page I’m looking at for this as well.

RWHDocument.FontSettings = New Fonts.FontSettings
RWHDocument.FontSettings.GetFontsSources()
RWHDocument.FontSettings.SetFontsFolder(HttpRuntime.AppDomainAppPath + “\Fonts”, True)

Any suggestions gratefully received.

Colin

@RWHTravelIT Could you please provide the font files, source document and simple test project (or test code) so we could reproduce the issue?

Thanks for getting back. I’ve added the fonts and the docx template. Code wise it’s a little tricky as there’s a lot going on around it but basically. I’m using the document builder to insert HTML into the document template and then doing a document.print then document.save as pdf. The pdf is fine. We are evaluating aspose.pdf, so I guess I could pick up the output file and use the PDfViewer object\PrintDocumentWithSettings method.

Colin

Fonts.zip (451.4 KB)

RWH.docx (155.2 KB)

@RWHTravelIT On my side I see that text with “Alright San Light” font is being rasterized to images when printing. This may lead to the quality loss on some output devices. Is it what you observe? Or maybe you could provide a print to file output or a screenshot which will illustrate the problem?

Also as another workaround to the problem, you could save the document to XPS and use XPS print API to print your document.