Hi Steen Thrane Jacobsen,
Thank you for contacting Syncfusion support.
As of now, we don’t have support to get the Pdf document file size before calling the save method. Because, file writing streams are start at the PdfDocument.save(). So, We recommend the below steps to find the PDF file size before make it to PDF document,
|
//Initialize the memory stream.
MemoryStream stream = new MemoryStream();
//Save the document
document.Save(stream);
//Get File size in Kb.
float fileSize = (stream.ToArray().Length) / 1024f;
//Generate PDF file.
File.WriteAllBytes("../../Output.pdf", stream.ToArray()); |
Please let us know if you need any further assistances in this.
Regards,
Surya V