Hi
I try to export the content of an ultrawingrid in PDF using this code :
private static void Export(UltraGrid grid, Stream target, GridExportFileFormat format)
{
using (var exporter = new UltraGridDocumentExporter())
exporter.Export(grid, target, format);
}
This works fine in the English version of the software, but not in the Chinese one.
I get an exception : Object reference not set to an instance of an object.
The stack trace is the following:
at Infragistics.Documents.Reports.TTF.Font.Subset(Boolean regular)
at Infragistics.Documents.Reports.PDF.Font.EmbedData()
at Infragistics.Documents.Reports.PDF.PdfDocument.Generate(Stream stream)
at Infragistics.Documents.Reports.Report.Report.Publish(Stream stream, FileFormat format)
at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.EndExportInternal(UltraGridExporterHelper ultraGridExporterHelper, Boolean canceled) at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridExporterHelper.Infragistics.Win.UltraWinGrid.IUltraGridExporter.EndExport(Boolean canceled) at Infragistics.Win.UltraWinGrid.UltraGrid.Export(IUltraGridExporter exporter) at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.Export(UltraGrid grid, ISection section) at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.Export(UltraGrid grid, Report report) at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.Export(UltraGrid grid, Stream stream, GridExportFileFormat fileFormat)
I guess it's because the Chinese version uses Simsun font, instead of Arial in the English version.
But I need to use Simsun in Chinese, it is not possible as Arial is not well readable in Chinese.
How could I do the PDF export ?
Thanks for your help.
Hi,
I tried an old sample I had and just changed the font to SimSun and it worked fine. This was of course using our new version where I changed the font embed algorithm to provide better support for languages like this... What version are you using? Can you post a sample and then I can take a look at what is happening for you.
Iuse V11.1, and I switched my PC to Chinese language.
I try to make a small sample that reproduce the problem.
Regards.