MemoryStream xmlDoc = new MemoryStream();
presentationDoc.SaveToPdf(xmlDoc);
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.BindXML(xmlDoc, null);
Here I am getting the exception on the fourth line.
{pdf.BindXML(xmlDoc,null)}
The data at the root level is invalid. Line 1, position 1:
https://forum.aspose.com/t/the-data-at-the-root-level-is-invalid-line-1-position-1/116101
Here presentationDoc is Aspose.Slides.Presentation type.