We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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 couldn’t 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: http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/howto-convert-a-document-to-pdf.html

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