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

PDF Export error

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John John
Top achievements
Rank 1
John John asked on 12 Feb 2010, 12:02 PM
Hi..
         I am getting the following error while i am trying to export the grid data into PDF..I have the grid which is having nested grid also inside of it.

System.NullReferenceException: Object reference not set to an instance of an object.
  at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
  at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
  at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
  at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.SystemException: System.NullReferenceException: Object reference not set to an instance of an object.
  at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
  at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
  at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
  at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SystemException: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
   at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
   at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
   at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
   at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
   at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
   at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)]
   Telerik.Web.Apoc.ApocDriver.FireApocError(String message) +122
   Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader) +951
   Telerik.Web.Apoc.ApocDriver.Render(XmlReader inputReader, Stream outputStream) +293
   Telerik.Web.Apoc.ApocDriver.Render(TextReader inputReader, Stream outputStream) +61
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderForm(HtmlTextWriter nullWriter, Control form) +2018
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8673113
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderPage(HtmlTextWriter nullWriter, Control page) +161
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +825
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


I am unable to find the bug.So looking forward to hear from you.


1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 12 Feb 2010, 03:59 PM
Hello John,

Judging by the exception, there is a problem with the fonts. Please post your markup here or attach a runnable demo and I will try to reproduce the problem on my end.

Regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
John John
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or