NullReferenceException when using PdfViewer in an AddIn

4 posts, 0 answers
  1. Fonger
    Fonger avatar
    2 posts
    Member since:
    Jan 2014

    Posted 21 Jan 2014 Link to this post

    I try to use the PdfViewer in an addin (using the .net managed addin framework), hosted in a winform host application. When I open a pdf file I get this exception:

       at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Utils.Helper.get_Dispatcher() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Documents\Fixed\Core\FormatProviders\Pdf\Utils\Helper.cs:line 25

       at Telerik.Windows.Documents.Fixed.FixedDocumentStreamSource.<>c__DisplayClass8.<LoadDocument>b__6() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Documents\Fixed\FixedDocumentViewers\Fixed\FixedDocumentStreamSource.cs:line 180

       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Threading.ThreadHelper.ThreadStart()

    I suspect the helper class is using Application.Current.Dispatcher. Application.Current is null in our environment.

    Is there a work around for this problem so I can use the viewer in an addin?

    Thank you,

    Fonger.

  2. Alexander
    Admin
    Alexander avatar
    41 posts

    Posted 23 Jan 2014 Link to this post

    Hello Fonger,

    Thank you for contacting us.

    I would suggest reading this article which describes some common problems concerning RadPdfViewer, one of which is the problem you are having.

    I hope this is helpful. Please, do not hesitate to contact us if you have any other questions.

    Regards,
    Alexander
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Fonger
    Fonger avatar
    2 posts
    Member since:
    Jan 2014

    Posted 24 Jan 2014 Link to this post

    Hello Alexander,

    Thanks for your reaction. I'm afraid your link isn't working (its just 'http:///'). Can you post it again?

    Thanks,

    Fonger.

  5. Petya
    Admin
    Petya avatar
    975 posts

    Posted 24 Jan 2014 Link to this post

    Hello Fonger,

    Please follow this link: http://www.telerik.com/help/wpf/radpdfviewer-troubleshooting-common-problems.html.

    Let us know if you have other questions.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top