We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

PDFLogicDocument.Save() method throws a fatal exception in Windows 2008 R2 Enterprise Edition

Thread ID:

Created:

Updated:

Platform:

Replies:

97918 Jan 19,2011 05:24 PM Jan 20,2011 02:54 AM ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
Lisa McCabe
Asked On January 19, 2011 05:24 PM

Hi,

Syncfusion (version 4.401.0.54) PDFLogicDocument object's Save method throws the following fatal "Index out of bounds exception" exception:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Syncfusion.Pdf.Implementation.Utilities.RtlRenderer.StringShape(String text, SCRIPT_ITEM[] items, Font font, Int32 count, Int32[] visualToLogical, UInt16[]& glyphs)
at Syncfusion.Pdf.Implementation.Utilities.RtlRenderer.GetGlyphIndices(String line, PDFUnicodeTrueTypeFont font, Boolean rtl, UInt16[]& glyphs)
at Syncfusion.Pdf.Implementation.Objects.Fonts.PDFUnicodeTrueTypeFont.GetTextWidth(String text)
at Syncfusion.Pdf.Implementation.Objects.PDFFontWrapper.GetTextWidth(String text)
at Syncfusion.Pdf.Implementation.Objects.PDFGraphics.MeasureString(String text, IPDFFont font, IPDFGraphicState properties)
at Syncfusion.Pdf.Implementation.Objects.PDFGraphicsCoordinator.MeasureString(String text, IPDFFont font, IPDFGraphicState properties)
at Syncfusion.Pdf.DLS.PDFCustomGraphics.MeasureTextRange(TextRange txtRange, String text)
at Syncfusion.DLS.TextRange.Syncfusion.Layouting.ITextMeasurable.Measure(CustomGraphics cg, String text)
at Syncfusion.DLS.TextRange.Measure(CustomGraphics cg)
at Syncfusion.Layouting.LCLeaf.Layout(RectangleF rect)
at Syncfusion.Layouting.LCContainer.DoLayoutChild(LayoutContext childContext)
at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
at Syncfusion.Layouting.LCLineContainer.DoLayoutChild(LayoutContext childContext)
at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
at Syncfusion.Layouting.LCContainer.DoLayoutChild(LayoutContext childContext)
at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
at Syncfusion.Layouting.LCTable.DoLayoutCell(LayoutContext childContext, RectangleF cellArea)
at Syncfusion.Layouting.LCTable.DoLayoutRow()
at Syncfusion.Layouting.LCTable.Layout(RectangleF rect)
at Syncfusion.Layouting.LCContainer.DoLayoutChild(LayoutContext childContext)
at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
at Syncfusion.Layouting.LCLineContainer.DoLayoutChild(LayoutContext childContext)
at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
at Syncfusion.Layouting.LCContainer.DoLayoutChild(LayoutContext childContext)
at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
at Syncfusion.Layouting.LCContainer.DoLayoutChild(LayoutContext childContext)
at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
at Syncfusion.Layouting.Layouter.Layout(IWidgetContainer widget, ILayoutProcessHandler handler, CustomGraphics cg)
at Syncfusion.DLS.Rendering.DocumentLayouter.LayoutPages()
at Syncfusion.DLS.Rendering.DocumentLayouter.Layout(IDocument doc, CustomGraphics cg)
at Syncfusion.Pdf.DLS.PDFLogicDocument.DrawToInnerDocument()
at Syncfusion.Pdf.DLS.PDFLogicDocument.Save(String fileName)

when the product runs in Windows 2008 environment.
This exception is not thrown when the DLS document embeddeded in the PDFLogicDocument object, has only English content.
If the content, i.e. if any " -> -> -> .... has a node with text in just one Asian font like Chinese/Japanese, or if its mixture of one or more Asian language, then the DLS save to PDF would throw this fatal exception.

This occurs when an ASP.NET application deployed on an IIS 7 webserver, in Windows 2009 R2 machine.
From debugging the application it looks like the
Save method either throws an exception (when there is one more text content in just one Asian font), or times out (when there is one or more text content in a mixture of Asian fonts), and the PDF never gets made. I tried substituting different Windows 2008 Asian fonts in the "FontName" parameter of the format node embedding the node, but none of it worked.

Is this issue because of any dlls in c:\windows\system32 the RTLRenderer depends on, which is missing in Windows 2008 environment?
Could you analyze the stack trace, and let us know what is the array whose index is out of bounds?
Is there a quick workaround for this?



Priyadharshini J [Syncfusion]
Replied On January 20, 2011 02:54 AM

Hi Lisa,

We could see that you are using older version( 4.401.0.54) of Essential Pdf. The mentioned issue has been fixed in our latest version 8.4.0.10. Kindly upgrade to the latest version. I have placed a simple sample for the same in the location below:
Forum 97918-1750216947.zip

Note:
As we haven’t received your valid license information that would have enabled us to restore support to you, we are unable to provide further support for this incident. Please contact salessupport@syncfusion.com for license verification, and one of our sales team members will be very happy to render prompt assistance.

Regards,
Priyadharshini


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;