Hello,
Is there a way to have the PDF document increment pages on it's own based on the content?
public static string CreatePDF(string message)
{
// Create a new PDF document
PdfDocument document = new PdfDocument();
//Add a page to the document
Syncfusion.Pdf.PdfPage page = document.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;
PdfStringFormat format = new PdfStringFormat();
//Set the text alignment.
format.WordWrap = PdfWordWrapType.Word;
//Draw the text
graphics.DrawString(message, new PdfStandardFont(PdfFontFamily.Helvetica, 16), PdfBrushes.Black, new PointF(0, 0), format);
//Save the document to the stream
MemoryStream stream = new MemoryStream();
document.Save(stream);
//Close the document
document.Close(true);
//Save the stream as a file in the device and invoke it for viewing
var path = DependencyService.Get<IWriteToFile>().Save("Output.pdf", stream);
return path.ToString();
}
Thanks,
David