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

Free Support Forum - aspose.com

Excel converted to PDF displays in landscape view and not portrait


This is from Ancile where we use Aspose pdf, word to convert our uPerform documents and Microsoft Office documents.
For this issue, when attempting to view/print converted excel spreadsheets to pdf only, the screen defaults to a landscape view even though its set to Portrait view. Also when attempting to print, the excel preview composite displays in landscape and the page orientation is set to portrait. When the document is printed, it prints to landscape. Choosing different page scaling options doesn't correctly render the page to be printed. The converted excel spreadsheet we tested with only had 2 cells populated with text. Issue occurs when viewing on our uPerform website. Issue doesn't occur when printing the excel spreadsheet from Excel or with an excel spreadsheet that was converted to pdf using Microsoft Office.

Issue occurs in Windows 7, XP and Windows server 2003. uPeform application is built on .NET. Aspose.pdf.dll we tested with was version 5.2 and 6.7. The aspose.pdf.kit.dll is 6.0.0.0. Issue occurs in IE 8 and Firefox 10.0. Created excel spreadsheets in Office 2007 and 2010

I've uploaded a screenshot for your review.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try the latest version:

Aspose.Cells for .NET 7.1.2



Please provide us your source xls/xlsx file which you are converting to PDF.

Also, you can directly convert your Excel files into PDF using Aspose.Cells without the need of Aspose.Pdf.

Hi,

This issue is occuring on our Windows server and I'm a bit hesitant in running this .msi unless you know for sure its going to resolve the issue. We use our Windows 7, XP machines to access the website.

Attached is one of the spreadsheets we used in our testing. Our tool is pre-packaged with Aspose.pdf.dll to aid in converting our proprietary software's documents to .pdf and to convert Office documents to .pdf

Thank you.

Hi,

Please check the output pdf file converted by Aspose.Cells using the following code.

It appears to me fine.

I have used the latest version:

Aspose.Cells for .NET 7.1.2


You can also just download the DLL from ZIP archive if you want to avoid MSI.
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry367803.aspx

C#


string filePath = @“F:\Shak-Data-RW\Downloads\index.xls”;


Workbook workbook = new Workbook(“index.xls”);


workbook.Save(filePath + “.out.pdf”);

Hi,

Will conduct the test in our environment and keep you updated.

Thanks

Toks,

We have a Aspose.Cells version 6.0.0.0 and i’m trying to convert excel to pdf. First of all i see there are no build in methods available in the older version like Set AllColumnsInOnePagePerSheet to true.
The basic conversion is working. but i see part of the excel page is shifted to 2nd page in pdf. Is there any way i can set everything to one page in this older version?

@sanjaybk

Thanks for considering Aspose APIs.

You can set

PageSetup.FitToPagesWide = 1; 
PageSetup.FitToPagesTall = 1; 

to render a sheet to one page.

Besides in most recent version, you can do it like this

PageSetup.SetFitToPages(1, 1);

Download Link of Most Recent Version: