Hi,
While trying to convert xls to PDF/PPT, the font sizes are not same and in most cases smaller than the XLS font size. Kindly help with this issue.
Thanks.
Hi,
Thanks for your posting and using Aspose.Cells.
Please download and use the latest version:
Aspose.Cells for Java v8.7.1.4 and see if it makes any difference and resolves your issue.
If your issue still persists, then please provide us sample code, input files and output files. You can also provide us expected output files which you can create manually using their tools like MS-Excel, MS-PowerPoint, Adobe Acrobat. Also some screenshots highlighting your issues will be helpful for us. Thanks for your cooperation in this regard. Have a good day.
Hi Team,
I have tried generating PDF/PPT with latest version of ASPOSE Cells for Java v8.7.1.4 and it doesnt make a difference.
I have attached the PDF generated using the latest jar with this reply.
Can you please help us in resolving this issue.
Thanks,
Preethi.
Hi Preethi,
for(int i = 0; i < book.getWorksheets().getCount(); i++)
{
Worksheet sheet = book.getWorksheets().get(i);
sheet.getPageSetup().setZoom(100);
}
book.save(dir + “output “+CellsHelper.getVersion()+”.pdf”);
Hi Team,
We are getting the same results even when we set the zoom size in spreadsheet to 100%.
We have attached the spreadsheet for your reference.
Please look into it and provide us solution.
Thanks in advance.
Hi again,
for(int i = 0; i < book.getWorksheets().getCount(); i++)
{
Worksheet sheet = book.getWorksheets().get(i);
sheet.getPageSetup().setZoom(100);
}
book.save(dir + “rep19+spreadsheet (with setting zoom).pdf”);
Hi Team,
We are not able to get the desired results for PDF/PPT when it is integrated with web application which runs on UNIX server.
As a standalone application it is working fine.
I have attached the code piece with this reply.
public void exportPPTX(OutputStream outputStream)
throws Exception
{
Worksheet worksheet = getWorkbookDesigner().getWorkbook().getWorksheets().get(SHEET_NAME_CHART);
worksheet.freezePanes(2,2,41,31);
setOleExcelEndRow(42);
setOleExcelEndColumn(31);
setPptHorizontalResolution(300);
setPptVerticalResolution(300);
super.exportPPTX(outputStream);
}
Thanks in advance.
Hi Prabu,
- Unix/Linux flavor, version & architecture
- JDK type, version & architecture
- JVM arguments, if any
- We need an executable sample application covering your complete scenario in perspective of Aspose APIs. It would be appropriate that you should create a simple console application that replicates the problem in non-Windows based platform such as Unix/Linux. A simple Java class should suffice if it is complete and does not have compilation errors. Try not to use 3rd party APIs in order to keep it simple. Moreover, if you are importing data from any database, you should create the data source dynamically so that database connectivity isn’t required while testing the scenario on our side.
- Source spreadsheet, if different than what you have already shared in this thread.
- Resultant PDF generated with the sample application as mentioned in point 4) while using the latest version of Aspose.Cells for Java 8.7.1.4.
Hi again,
- rep19+spreadsheet.xlsx(nofonts).pdf: The file was generated with the code provided at Snippet 1 without setting fonts in the code. As a result API has substituted the required fonts with available one.
- rep19+spreadsheet.xlsx(fonts).pdf: This file was generated with the code provided at Snippet 2 where font directory contains the TTFs of Calibri & Arial font families. In this case the font in the PDF is smaller than the font specified in the spreadsheet. Reason is the scale factor set for the said worksheet.
- rep19+spreadsheet.xlsx(fonts-scale-fixed).pdf: This file contains the expected results because correct fonts have been embedded along with correct text size. I have verified the results using Adobe Acrobat Pro. Please refer to the code in Snippet 3.