This is a migrated thread and some comments may be shown as answers.

DataGrid Export to PDF - unable to retrieve unicode ranges

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chad
Top achievements
Rank 1
Chad asked on 11 Jun 2015, 02:40 PM

I'm hoping someone has seen this before.

On one web server (and only one) the following exception is being generated when the grid data is exported to PDF:

"System.Exception: Unable to retrieve Unicode ranges. at Telerik.Pdf.Gdi.GdiUnicodeRanges.LoadRanges(GdiDeviceContent dc) at ... [more stack]

 I've disassembled the Telerik assembly that contains the LoadRanges function and this function contains a call to a Windows API function, i.e.

int fontUnicodeRanges = NativeMethods.GetFontUnicodeRanges(dc.Handle, glyphSet);

if (fontUnicoderanges == 0)

{

   [code]

}

else

{

   throw new Exception("Unable to retrieve Unicode ranges.");

}

The NativeMethods.GetFontUnicodeRanges maps to the following gdi32.dll Windows API function:

internal static extern int getFontUnicodeRanges(IntPtr hdc, GlyphSet lpgs);

The return code from this function is 0 (ERROR).  Does anyone know what might cause this particular situation when exporting to PDF from the Telerik grid? I'm using the default PDF export functionality of the grid.

 

1 Answer, 1 is accepted

Sort by
0
Chad
Top achievements
Rank 1
answered on 11 Jun 2015, 03:23 PM

That code section should be:

if (fontUnicodeRanges != 0)

Tags
Grid
Asked by
Chad
Top achievements
Rank 1
Answers by
Chad
Top achievements
Rank 1
Share this question
or