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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Sending PDF file to PDF viewer

Thread ID:





123439 Mar 17,2016 01:07 PM UTC Mar 21,2016 01:54 PM UTC WPF 3
Tags: PdfViewer
Vladimir Culum
Asked On March 17, 2016 01:07 PM UTC


In the app, I am creating PDF file from scratch.
I can create and save the file.

Is there any option that I don`t save file with some generic name and to open it in the viewer?

I want to create file and then send it to the viewer.

Then, user can save, print.... if there is need.

Other option is to create PDF file, save it, open it in Viewer and delete at the end (some kind of temp file).

Thank You.

Deepak Gunasekaran [Syncfusion]
Replied On March 18, 2016 01:02 PM UTC

Hi Vladimir,

We can create a PDF file and display it in PDFViewer without saving the file by using the following code Snippet.


//Create a new PDF document.

PdfDocument document = new PdfDocument();

//Add a page to the document.

PdfPage page = document.Pages.Add();

//Save the document to Stream.


//Close the document.


// Load the stream in PdfViewerontrol


We have created a simple sample to achieve the same and it can be downloaded from the following location:


Please try this and let us know whether it met your requirement.


Deepak G

Vladimir Culum
Replied On March 19, 2016 10:15 PM UTC


Thank You. I made it to work as I wanted.


Deepak Gunasekaran [Syncfusion]
Replied On March 21, 2016 01:54 PM UTC

Hi Vladimir,

Thank you for your update. Please let us know if you need further assistance.

Deepak G


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon