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

Free Support Forum - aspose.com

Export Datagrid to PDF

Is it possible to export a datagrid (rendered as an HTML table) to PDF using the Aspose.PDF utility & vb.net?

Is there any sample code to do something like this?

Also, is there any sample code to add images and text on the fly to the PDF file?

thanks in advance.

Dear wavesmash,

Thanks for your consideration.

You can’t export datagird to PDF directly using Aspose.Pdf. You should convert the HTML table into XML file that fit Aspose.Pdf.

You can refer to our API examples to find sample code about adding images and text on the fly to the PDF file.

I need to export datagrid into pdf. with the reference of some links at your forum i came to know that it is not possible to convert datagrid to pdf directly. can u provide more detailed information about this.

I have used the steps u told in those links but i m unable to get the output
plzz help me regarding this

Hi akshata.sashok,

Aspose.Pdf can convert Object Array, DataTable and DataView to PDF format but currently you might not be able to directly export datagrid into PDF file. I think you may first export the datagrid values to DataTable and then export it to PDF file.

Information on saving DataTable to PDF can be found at http://www.aspose.com/documentation/.net-components/aspose.pdf-for-.net/integrate-table-with-database.html

Information on saving DataGrid to DataTable can be found at http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/73c01abf-8c79-4ac8-9391-c8700cb1c917