Hi Aspose’s Support,
I have converted Excel to Pdf as following sample :
https://docs.aspose.cloud/display/cellscloud/Convert+Excel+Workbook+to+Different+File+Formats
Here is my PDF Save Options :
true
true
false
None
400
95
false
Pdf
In my Excel, I can see total of 7 pages in PrintPreview. But in result convert PDF, I can see total of 14 pages.
Can you show me the root of this issue and how to fix it ?
Thanks,
Chien
Hi,
After an initial test, I observed the issue as you mentioned with Cloud APIs. The problem is also replicated with latest revision of the Aspose.Cells for .NET 8.6.1.2 therefore we logged it as “CELLSNET-44048” in Nanjing Jira for correction purposes. I found the output layout of converting PDF from Excel file is not identical as per the Print Preview of the worksheet in MS Excel, it gives 14 pages instead of 7. I have logged a ticket with an id “SAASCELLS-133” (into Cloud JIRA) for your issue. As soon as a fix is made to the .NET APIs available, we would notify the respective team, so, they could integrate the fix in cloud service.
Thank you.
Hi,
Thanks for using Aspose.Cells.
For your issue logged as
- CELLSNET-44048 - The output layout of converting PDF from Excel file is not good
The print quality in page setup is 200 DPI(workbook.Worksheets[0].PageSetup.PrintQuality), different print quality setting may cause different page layout. In the attachment, while using Adobe PDF Printer, there are multi print quality settings, you will find there are 12 pages in 72DPI print quality setting, but 7 pages in 600 DPI print quality setting. But for Microsoft XPS Document Writer Printer or Microsoft Print to PDF Printer, there is only one print quality setting(600 DPI) and there are 7 pages.
So to get same result as in MS Excel, set print quality to 600
DPI(workbook.Worksheets[0].PageSetup.PrintQuality = 600), before saving to pdf. The generated pdf is 7 pages.
Hi,
Hi all,
Thanks all for your help. I can fix the issue with your suggestions
Best Regards,
Chien
Hi Chien,
Hi Chien,
This is to inform you that Aspose.Cells for Cloud service now allows to configure the Page Setup for a particular worksheet. You can now call the pagesetup API to set the Print Quality while using the following URI & XML.
curl -X POST "https://api.aspose.cloud/v3.0/cells/Book1.xlsx/worksheets/SHEET1/pagesetup"
-H "accept: application/json"
-H "authorization: Bearer [Access_Token]"
-H "Content-Type: application/json"
-H "x-aspose-client: Containerize.Swagger" -d "{ "PrintQuality": 600 }"
C#
string name = "Book1.xlsx";
string sheetName = "SHEET1";
PageSetup pageSetup = new PageSetup();
pageSetup.PrintQuality = 600;
string folder = null;
var response = cellsAPI.CellsPageSetupPostPageSetup(name, sheetName, pageSetup, folder);
Console.WriteLine(response);
Please note, we are currently working on the documentation for this newly added API therefore as soon as the API Reference is live, we will share the link here.
The issues you have found earlier (filed as SAASCELLS-133) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.