


The following code snippet explains how to add more sections to a PDF document with different page settings.

You can add sections to a PDF document by using the PdfSection available in PdfDocument instance and create page settings to the PdfSection using the PageSettings property. Adding sections with different page settingsĮssential PDF supports adding sections with different page settings like Height, Margins, Orientation, Rotate, Size, Transition and Width. You can download a complete working sample from GitHub.

Please refer PDF/Xamarin section for respective code samples. Close ( true ) //Save the stream into pdf file //The operation in Save under Xamarin varies between Windows Phone, Android and iOS platforms. MemoryStream stream = new MemoryStream () document. PointF ( 20, 20 )) //Save the document as stream. DrawString ( "Hello world!", font, brush, new Syncfusion. PdfFont font = new PdfStandardFont ( PdfFontFamily. PdfBrush brush = new PdfSolidBrush ( Syncfusion. Add () //Create PDF graphics for the page. PdfDocument document = new PdfDocument () //Add a page. return File ( stream, contentType, fileName ) string fileName = "Output.pdf" //Creates a FileContentResult object by using the file contents, content type, and file name. string contentType = "application/pdf" //Define the file name. Close ( true ) //Defining the ContentType for pdf file. Save ( stream ) //If the position is not set to '0' then the PDF will be empty. PointF ( 20, 20 )) //Creating the stream object MemoryStream stream = new MemoryStream () //Save the document as stream document.
