Load pdf document will cause browser crash using C1PdfViewer

Posted by: wcyc_cj on 28 November 2017, 5:25 pm EST

  • Posted 28 November 2017, 5:25 pm EST


    When try to load pdf document using C1PdfViewer, it will cause the web browser crash, the exception messages as followed:

    User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
    Timestamp: Wed, 29 Nov 2017 06:14:24 UTC

    Message: Sys.InvalidOperationException: ManagedRuntimeError error #4004 in control 'SilverlightControl': System.Windows.Markup.XamlParseException: [Line: 0 Position: 0] ---> System.IndexOutOfRangeException: [Arg_IndexOutOfRangeException]
    Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.50428.00&File=mscorlib.dll&Key=Arg_IndexOutOfRangeException
    at C1.Silverlight.PdfViewer.CIDFontType2.GetGlyphId(Int32 cid)
    at C1.Silverlight.PdfViewer.CIDFontType2.InitializeCharObjects(IEnumerable`1 charObjects)
    at C1.Silverlight.PdfViewer.Type0.GetCharObject(Byte[] value)
    at C1.Silverlight.PdfViewer.PdfPageElement.RenderText(Byte[] bytes)
    at C1.Silverlight.PdfViewer.PdfPageElement.ShowTj()
    at C1.Silverlight.PdfViewer.PdfPageElement.ExecuteCommand(String command, BinaryReader br)
    at C1.Silverlight.PdfViewer.PdfPageElement.RunLoop(BinaryReader reader, TimeSpan timeOut, Func`2 onExectuingCommand)
    at C1.Silverlight.PdfViewer.PdfPagesList.get_Item(Int32 index)
    at System.Windows.Controls.ItemCollection.GetGenericItem[T](Int32 index)
    --- End of inner exception stack trace ---
    at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
    at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
    at MS.Internal.XcpImports.FrameworkElement_ApplyTemplateInternal(FrameworkElement frameworkElement)
    at System.Windows.Controls.ScrollContentPresenter.HookupScrollingComponents()
    at System.Windows.Controls.ScrollContentPresenter.OnApplyTemplate()
    at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)

    The C1.Silverlight.PdfViewer.dll version: 5.0.20162.516

    How can we solve this problem?



  • Replied 29 November 2017, 8:59 pm EST

    Hi Julian,

    Thank you for sharing the exception message and C1Silverlight build version.

    However, we could not reproduce the issue at our end trying to load the pdf you shared using the C1PdfViewersample, located at ComponentOne Samples\Silverlight\C1.Silverlight.PdfViewer\VB with FireFox & Internet Explorer browsers. Please refer attached screen-shot of pdf loaded successfully with FireFox.

    Could you please try using the above product sample to load the pdf file. If the issue still occurs, could you please share the FireFox version you are using !

    Ruchir Agarwal
  • Replied 30 November 2017, 11:58 am EST

    Hi, Ruchir ,

    Thank your reply, I have run ComponentOne Samples\Silverlight\General\CS\ControlExplorer, but the exception will be thrown in the IE 8.



  • Replied 30 November 2017, 9:07 pm EST

    Hello Julian,

    Thank you for sharing the image.
    Using the ControlExplorer sample we too could observe the behavior and it seems to be random but specific to your pdf.
    Hence the issue has been escalated to the concerned team {Tracking ID: 299315}

  • Marked as Answer

    Replied 4 December 2017, 6:12 pm EST

    Hi Julian,

    We are happy to inform you that the issue has been fixed. Is this issue a critical one/show-stopper for you. If not, then the build including fix to this issue would be available in 2018v1 (around March), but if it is then we can request the concerned team to prepare a build specially for you.

    Ruchir Agarwal
  • Replied 11 December 2017, 7:57 pm EST

    Hi Ruchir,

    Thanks for your help. The issue is critical for us, so we are glad to get the specially build to test.

    Julian Chen
  • Replied 12 December 2017, 6:27 pm EST

    Hi Julian,

    Thank you for letting us know the importance of the issue for you.
    I have asked the concerned person to share a build for this. We will update you once we it is ready for you to use.

  • Replied 12 December 2017, 11:48 pm EST

    Hi Julian,

    Please download the build including fix using the following URL: https://www.dropbox.com/s/ls5bo2wv56q99kk/C1Silverlight5_5.0.20173.582.zip?dl=0
    Let me know if you face any issues with it.

    Ruchir Agarwal
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels