Export to PDF sample with specific width and height for each block in the PDF document

Hi,

How can I Export data From a DataGrid to a pdf document with 24 blocks in each page 
with specific width and height specified for each block in a page?

Could you please provide me an example?

Thank you.
John

3 Replies

TS Thiyagu Subramani Syncfusion Team May 19, 2020 04:34 PM UTC

Hi John, 

Thanks for contacting Syncfusion forum. 

Based on your reported information we did not clear about your query. So before we proceed with your query we need below details to give appropriate solution as soon as possible. 

1.  In pdf document you have mentioned 24 blocks in each page. So, please confirm whether you need 24 columns or rows in pdf document ? 

2.  Share screenshot representation of your exact requirement 

Please get back to us, if you need any further assistance. 

Regards, 
Thiyagu S. 



JS John Stephen Mangam May 19, 2020 05:06 PM UTC

Hi,

Thank you for the message.

I need 3 columns and 24 rows with the ability to specify the height and width of each block and the and other distance parameters marked in red in the screenshot.

I have attached the screenshot.

Thank you.
John

Attachment: PDF_4af605df.7z


TS Thiyagu Subramani Syncfusion Team May 20, 2020 01:14 PM UTC

Hi John, 

Thanks for your update. 

We can customize the width of the column and height of the row in a PdfGrid. If we set width or height for the cell, it will set as column's width and row's height respectively. As per the behavior, the greater height value of the cell is set as the height of the particular row. We could not specify the various widths for various cells in same column. And also we cannot able to customize various heights for various cells in same row.  

Please find the API for specifying the width and height,  
  
//Specify the 100 width to 0th column.  
pdfGrid.columns.getColumn(0).width = 100;  

//Specify the 50 height to 1st row.  
pdfGrid.rows.getRow(1).height = 50;  
  
For more information refer below sample. 


Please get back to us, if you need any further assistance. 

Regards, 
Thiyagu S 


Loader.
Up arrow icon