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

Saving a PdfDocument by .save("output") does not work?


I am trying to create and save a PDF document according to this:

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a page to the document.
PdfPage page = document.Pages.Add();
//Create PDF graphics for the page.
PdfGraphics graphics = page.Graphics;
//Set the standard font.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
//Draw the text.
graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
//Save the document.
//Close the document.

However, the document.save() method does not take String as parameter but only System.IO.Stream. What should I do? 
The instructions with the code is taken from: https://help.syncfusion.com/file-formats/pdf/getting-started?cs-save-lang=1&cs-lang=csharp 

Thank you in advance!

3 Replies

SK Sasi Kumar Sekar Syncfusion Team September 28, 2017 09:09 AM UTC

Hi Johannes, 
Thank you for contacting Syncfusion support. 
In Xamarin platform we can save the document as steam only. We have created the simple sample to Generate PDF. Please find the UG document link and simple sample to save PDF document below for your reference. 
UG documentation Link to Save PDF document : 
Sample : 
Please let us know if you need further assistance. 
Sasi Kumar S. 

JB Johannes Berghult September 29, 2017 09:45 AM UTC

Hi Sasi,

Thank you very much for the great support!

Best regards,

RP Ranjani Prabhakaran Syncfusion Team October 2, 2017 06:48 AM UTC

Hi Johannes, 

You are most welcome. 


Live Chat Icon For mobile
Up arrow icon