The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
This is a typical case of not able to convert to word documents to pdf. I am trying to use the same code example that was provided by you as part of the samples. While using the word file which is part of the example it is working fine. When I try to use any other document that has some formatting, I am getting the error as follows.
Syncfusion.DLS.XDLSException was unhandled by user code Message="Collection cannot serialize if Document property is NULL" Source="Syncfusion.DLS.Base" StackTrace: at Syncfusion.DLS.Collections.EntityCollectionBase.Syncfusion.DLS.XML.IXDLSSerializableCollection.AddNewItem(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElementCollection(IXDLSSerializableCollection coll) at Syncfusion.DLS.XML.XDLSReader.ReadChildElement(Object value) at Syncfusion.DLS.XML.XDLSHolder.ReadHolder(IXDLSContentReader reader) at Syncfusion.DLS.XDLSSerializableBase.Syncfusion.DLS.XML.IXDLSSerializable.ReadXmlContent(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElement(IXDLSSerializable value) at Syncfusion.DLS.XML.XDLSReader.ReadChildElement(Object value) at Syncfusion.DLS.XML.XDLSHolder.ReadHolder(IXDLSContentReader reader) at Syncfusion.DLS.XDLSSerializableBase.Syncfusion.DLS.XML.IXDLSSerializable.ReadXmlContent(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElement(IXDLSSerializable value) at Syncfusion.DLS.XML.XDLSReader.ReadElementCollection(IXDLSSerializableCollection coll) at Syncfusion.DLS.XML.XDLSReader.ReadChildElement(Object value) at Syncfusion.DLS.XML.XDLSHolder.ReadHolder(IXDLSContentReader reader) at Syncfusion.DLS.XDLSSerializableBase.Syncfusion.DLS.XML.IXDLSSerializable.ReadXmlContent(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElement(IXDLSSerializable value) at Syncfusion.DLS.XML.XDLSReader.ReadElementCollection(IXDLSSerializableCollection coll) at Syncfusion.DLS.XML.XDLSReader.ReadChildElement(Object value) at Syncfusion.DLS.XML.XDLSHolder.ReadHolder(IXDLSContentReader reader) at Syncfusion.DLS.XDLSSerializableBase.Syncfusion.DLS.XML.IXDLSSerializable.ReadXmlContent(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElement(IXDLSSerializable value) at Syncfusion.DLS.XML.XDLSReader.Deserialize(IXDLSSerializable value) at Syncfusion.DLS.Document.ReadXml(XmlReader reader) at Syncfusion.DLS.Document.OpenXml(Stream stream) at Syncfusion.DLS.Document.OpenXml(String fileName) at DocToPdf.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\Documents and Settings\madhavaswamy.PDC\Desktop\DocToPdf\CS\WebForm1.aspx.cs:line 66 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
This is a typical case of not able to convert to word documents to pdf. I am trying to use the same code example that was provided by you as part of the samples. While using the word file which is part of the example it is working fine. When I try to use any other document that has some formatting, I am getting the error as follows.
Syncfusion.DLS.XDLSException was unhandled by user code Message="Collection cannot serialize if Document property is NULL" Source="Syncfusion.DLS.Base" StackTrace: at Syncfusion.DLS.Collections.EntityCollectionBase.Syncfusion.DLS.XML.IXDLSSerializableCollection.AddNewItem(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElementCollection(IXDLSSerializableCollection coll) at Syncfusion.DLS.XML.XDLSReader.ReadChildElement(Object value) at Syncfusion.DLS.XML.XDLSHolder.ReadHolder(IXDLSContentReader reader) at Syncfusion.DLS.XDLSSerializableBase.Syncfusion.DLS.XML.IXDLSSerializable.ReadXmlContent(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElement(IXDLSSerializable value) at Syncfusion.DLS.XML.XDLSReader.ReadChildElement(Object value) at Syncfusion.DLS.XML.XDLSHolder.ReadHolder(IXDLSContentReader reader) at Syncfusion.DLS.XDLSSerializableBase.Syncfusion.DLS.XML.IXDLSSerializable.ReadXmlContent(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElement(IXDLSSerializable value) at Syncfusion.DLS.XML.XDLSReader.ReadElementCollection(IXDLSSerializableCollection coll) at Syncfusion.DLS.XML.XDLSReader.ReadChildElement(Object value) at Syncfusion.DLS.XML.XDLSHolder.ReadHolder(IXDLSContentReader reader) at Syncfusion.DLS.XDLSSerializableBase.Syncfusion.DLS.XML.IXDLSSerializable.ReadXmlContent(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElement(IXDLSSerializable value) at Syncfusion.DLS.XML.XDLSReader.ReadElementCollection(IXDLSSerializableCollection coll) at Syncfusion.DLS.XML.XDLSReader.ReadChildElement(Object value) at Syncfusion.DLS.XML.XDLSHolder.ReadHolder(IXDLSContentReader reader) at Syncfusion.DLS.XDLSSerializableBase.Syncfusion.DLS.XML.IXDLSSerializable.ReadXmlContent(IXDLSContentReader reader) at Syncfusion.DLS.XML.XDLSReader.ReadElement(IXDLSSerializable value) at Syncfusion.DLS.XML.XDLSReader.Deserialize(IXDLSSerializable value) at Syncfusion.DLS.Document.ReadXml(XmlReader reader) at Syncfusion.DLS.Document.OpenXml(Stream stream) at Syncfusion.DLS.Document.OpenXml(String fileName) at DocToPdf.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\Documents and Settings\madhavaswamy.PDC\Desktop\DocToPdf\CS\WebForm1.aspx.cs:line 66 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
BPBhuvaneswari P Syncfusion Team April 17, 2007 11:58 AM UTC
Hi Madhava,
Thank you for your interest in Syncfusion products.
I was able to reproduce the issue. Currently we do have limited support for converting Doc to PDF format. However it was not intended to be a full fledged Doc to PDF conversion solution and was only intended to be an unsupported utility class (Not supported/actively developed) that allowed to convert simple Doc to PDF for customers who owned both Essential DocIO and Essential PDF. We will also be removing reference to this functionality in our upcoming version.