Filestream being closed before PDFViewer loads document

2 posts, 0 answers
  1. Rajesh
    Rajesh avatar
    2 posts
    Member since:
    Apr 2012

    Posted 05 Jul 2012 Link to this post

    Hello,

    The filestream that I am using to open my pdf file is being closed before it loads its data into a  pdfViewer DocumentSource.  As a result, my pdfviewer does not load nor show the data from the pdf file as its contents.  How do I prevent this from occurring?
    My code is below:

     

    this.pdfViewer.DocumentSource = new PdfDocumentSource(new FileStream(@".\Resources\MERE_User_Guide_v1_2.pdf", FileMode.Open, FileAccess.Read));

    thanks

  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 10 Jul 2012 Link to this post

    Hello Rajesh,

    I am afraid I don't quite understand your question and we have not observed similar issues.

    Do you close the stream or you think that RadPdfViewer is closing it?

    Kind regards,
    Iva Toteva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top