How to Write Grid data into the PDF file


#1

Hi,

Thanks to Aspose team for replying me immediately for each question that i am asking.I have

one more doubt could you please tell me how to write grid data onto the PDF.Please send some

piece of code to me in .NET environment.

Thanks in advance

Vamsee.


#2

Thanks for considering Aspose.

Currently Aspose.Pdf does not specially provide a class to control the gird layout. As a workaround, you can use Class Table instead and set the table width and heigh manually.


#3

Please also refer to the NorthWind demo of our product. That demo extracts data from NorthWind database and put the data into PDF. Please describe your grid data on detail if you need more help.


#4

hi Kevin,

I think for writing grid data onto the PDF i have to use aspose.grid right. i am using that also but

i am unable to find the function to write that onto the PDF file.I want to write my webform

datagrid(.NET datagrid control content) onto the PDF file.Please tell me the solution ASAP.

thanks in advance.

vamsee.


#5

Aspose.Grid and .NET datagrid control are not supported directly. You have to create a table in Aspose.Pdf and put the data into the table by yourself. Please refer to http://www.aspose.com/wiki/default.aspx/Aspose.Pdf/DatabaseIntegration.html. That Wiki page may help you if you can get DataTable, DataView or object array from your grid control.


#6

hi,

if i am using the code that was send by you in the link. i am gettingsome error.i just copied the

code onto my webform and tried that it is showing error. i am sending you the error as an

attachment to you.Please resolve this for me.


#7

It seems your file path is not correct. Please use @“c:\testing.pdf” or “c:/testing.pdf” and try again. If it still won’t work, please provide your code that can reproduce this error.