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

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

Thread ID:





132897 Sep 27,2017 04:24 PM UTC Oct 2,2017 06:48 AM UTC Xamarin.Forms 3
Tags: PDF
Johannes Berghult
Asked On September 27, 2017 04:24 PM UTC


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!

Sasi Kumar Sekar [Syncfusion]
Replied On 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. 

Johannes Berghult
Replied On September 29, 2017 09:45 AM UTC

Hi Sasi,

Thank you very much for the great support!

Best regards,

Ranjani Prabhakaran [Syncfusion]
Replied On October 2, 2017 06:48 AM UTC

Hi Johannes, 

You are most welcome. 



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

This page will automatically be redirected to the 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