DataGrid Export to PDF - unable to retrieve unicode ranges

2 posts, 0 answers
  1. Chad
    Chad avatar
    2 posts
    Member since:
    Dec 2012

    Posted 11 Jun 2015 Link to this post

    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.

     

  2. Chad
    Chad avatar
    2 posts
    Member since:
    Dec 2012

    Posted 11 Jun 2015 in reply to Chad Link to this post

    That code section should be:

    if (fontUnicodeRanges != 0)

Back to Top