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. Image for the cookie policy date

Sending PDF file to PDF viewer


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.

3 Replies

DG Deepak Gunasekaran Syncfusion Team 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

VC Vladimir Culum March 19, 2016 10:15 PM UTC


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


DG Deepak Gunasekaran Syncfusion Team 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

Live Chat Icon For mobile
Up arrow icon