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

Free Support Forum - aspose.com

Issues related To Word- Excel and Image to PDF

Hello Aspose,

Greetings for the day…!

We have requirement where we need to convert Word, Excel and Image to PDF doc. I will explain query related each one by one.

[1] Excel to PDF : In Excel to PDF we are converting entire data into Stream and created one pdf document using Pdf pdfdocument = new Pdf(); class Aspose.Pdf.generator.Pdf.

My data has been converted to stream successfully but when i try to bind the stream to PDF as created above using pdfdocument.BindXML(stream, null); it gives me exception " Data at the root level is invalid. Line 1, position 1.". It would be really helpful if you provide way using converting data to stream and then put it into PDF. Also please let me know multiple ways to bind excel generated data to pdf.

[2] Word to PDF : we are using same mechanism like above. Successfully converted all the data into stream and trying to bind all the using pdfdocument.BindXML(stream, null); and getting same exception.It would be really helpful if you provide way using converting data to stream and then put it into PDF. Also please let me know multiple ways to bind word generated data to pdf.

[3] Image to PDF : We have requirement to convert image to PDF. Please let me elaborate. We need to take image as input, create PDF document, Some sections, need to do some Page.Setup like page.height and page.width. Then using Aspose.Pdf.Image we need to put those into PDF document. Could you please provide multiple ways to do the same. This requirement also we are handling thru stream reader. It would be helpful if you provide details along with other multiple ways.





Ashpak Saiyed:
[1] Excel to PDF : In Excel to PDF we are converting entire data into Stream and created one pdf document using Pdf pdfdocument = new Pdf(); class Aspose.Pdf.generator.Pdf.



My data has been converted to stream successfully but when i try to bind the stream to PDF as created above using pdfdocument.BindXML(stream, null); it gives me exception " Data at the root level is invalid. Line 1, position 1.". It would be really helpful if you provide way using converting data to stream and then put it into PDF. Also please let me know multiple ways to bind excel generated data to pdf.
Hi Ashpak,

Thanks for contacting support. In order to convert Excel files to PDF format, you need to try using Aspose.Cells for .NET. For more information, please visit Converting Excel to PDF Files

Please note that Aspose.Pdf for .NET provides the feature to convert XML/XSLT files to PDF format but it does not support the feature to convert MS Excel (XLS) files to PDF format.

Ashpak Saiyed:
[2] Word to PDF : we are using same mechanism like above. Successfully converted all the data into stream and trying to bind all the using pdfdocument.BindXML(stream, null); and getting same exception.It would be really helpful if you provide way using converting data to stream and then put it into PDF. Also please let me know multiple ways to bind word generated data to pdf.
In order to convert Word files to PDF format, please try using Aspose.Words for .NET. For more information, please visit How to Convert a Document to PDF

Ashpak Saiyed:
[3] Image to PDF : We have requirement to convert image to PDF. Please let me elaborate. We need to take image as input, create PDF document, Some sections, need to do some Page.Setup like page.height and page.width. Then using Aspose.Pdf.Image we need to put those into PDF document. Could you please provide multiple ways to do the same. This requirement also we are handling thru stream reader. It would be helpful if you provide details along with other multiple ways.
You can read image from stream or access it though image path over system and place it inside PDF document. Please share some details regarding multiple ways (required behaviors) for Image to PDF conversion, so that we can reply accordingly. Convert an Image to PDF

Hi,

Please follow <a href="</a> for a detailed reply.</p><p>Best Regards,</p>