Free Support Forum -

Attempting to convert xlsx or docx to pdf

I downloaded the latest version of Aspose.Pdf for .NET 6.2.0

I cannot find a way to directly convert a word 2007 or excel 2007 to pdf using aspose.pdf
I attempted to do
	Pdf pdf = new Pdf();
pdf.BindXML(fileName, null);
//pdf.BindFO(TemplatePath + fileName);
pdf.Save(fileName.Replace(".pdf", “.doc”));
and received the error {“Data at the root level is invalid. Line 1, position 1.”}
I couldnt find any documentation using the aspose.pdf component.

Must i also use aspose.cells and aspose.words just to get this to convert to pdf?

Thanks in advanced


Yes, your understanding is correct. To convert Excel spreadsheet to PDF, you need Aspose.Cells for .NET and to convert Word documents to PDF, you will need Aspose.Words for .NET.

I am a representative of Aspose.Cells team and would help you regarding converting Excel files (XLS/XLSX) to PDF. Please see the document for your complete reference:

Thank you.

Hi there,

Thanks for your inquiry.

I am from the Aspose.Words team. You can learn how to convert any Word document to PDF on this page here:

If we can help with anything else, please feel free to ask.