We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Retain Page layout when converting from Excel to PDF



Hello,
I am using ExcelToPdfConverter to convert a excel file. I use FitAllColumnsOnOnePage option however I need to keep the pdf file in Landscape layout together with it.
But once converted the PDF file is in Portrait layout.
Also there is lot of white space added between rows.

Any advise on this please?

Thanks


3 Replies

SR Sudha Ramachandran Syncfusion Team December 10, 2014 07:11 AM UTC

Hi Mihiri,

 

Thank you for using Syncfusion products.

 

Keep the pdf file in Landscape layout

Please try setting the orientation of the sheet as represented in the below code snippet, before converting it to PDF. We have provided a simple sample for your reference in the below link. Kindly try this and let us know if this helps.

 

Code Snippet:

 

//Setting orientation for the sheet

worksheet.PageSetup.Orientation = ExcelPageOrientation.Landscape;

 

ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);

 

Sample Link:

http://www.syncfusion.com/downloads/support/directtrac/general/XlsIOSample661687863.zip

There is lot of white space added between rows.

We are unable to reproduce the issue. It would be grateful for us to investigate on this if you could share us the following details.

1.       Input template or the generated file or a screen-shot highlighting the issue.

2.       Your working version of XlsIO.

 

Please let us know if you have any queries.

Regards,

Sudha Ramachandran



MI mihiri December 11, 2014 12:02 AM UTC

Hi,

Thanks for the reply and the firs tissue is solved with your tip.
Plesae find attached the files releted to the second issue.
I am using Syncfusion.XIsIO.base Version 11.4350.0.26

Thanks

Attachment: White_Space_Issue_7b153eb2.zip


SR Sudha Ramachandran Syncfusion Team December 11, 2014 11:50 AM UTC

Hi Mihiri,

 

Thank you for updating us.

 

We are unable to reproduce the issue at our end in the mentioned version. We have provided a simple sample and the generated PDF for your reference in the below links. Kindly try this and if the issue still persists, please create a Direct-Trac incident to log an issue report for the same.

 

Sample Link:

http://www.syncfusion.com/downloads/support/directtrac/general/XlsIOSample198496210.zip

 

Output PDF:

http://www.syncfusion.com/downloads/support/directtrac/general/ExceltoPdf-1246230794.zip

 

Please let us know if you have any queries.

Thanks,

Sudha Ramachandran


Loader.
Live Chat Icon For mobile
Up arrow icon