PDF is not generated as expected


#1

Hello Aspose Team,

We have excel with multiple images. Sample excel file is attached here with name ‘WidgetAndAllCharts.xlsx’, in Display1 images are placed. These images are placed with following code.

Workbook workbook = new Workbook(“WidgetAndAllCharts.xlsx”)
Worksheet ws=workbook.worksheets.get(‘Dispaly1’)

Shape shape = ws.getShapes().get(“Section” + sectionValue + sectionPostFix) //getting shapes, sectionValue will be ‘1’ or ‘2’ to 36 and sectionPostFix will be ‘1x1’ or ‘2x2’ or ‘2x4’
int pictureIndex = ws.getPictures().add(shape.getUpperLeftRow(), shape.getUpperLeftColumn(), inputStream) //inputStream of respective image.
Picture picture = ws.getPictures().get(pictureIndex)
picture.setLeft(shape.getLeft())WidgetAndAllCharts.zip (678.4 KB)

picture.setTop(shape.getTop())
picture.setWidth(imgWidth)
picture.setHeight(imgHeight)
picture.setPlacement(shape.getPlacement())

And after placing the images we are saving this in .pdf with following code, Images layout will not be same as excel, layout. Space between widgets, size of images (width) are not as expected/similar as excel file. Could you please look into this from your side.

Workbook workbook = new Workbook(“WidgetAndAllCharts.xlsx”);

workbook.calculateFormula();

workbook.save(“myresult.pdf”); //used Display1 sheet


#2

@niteshregmi1234,
Thank you for your query. We are working on it and will share our findings after detailed analysis.


#3

@niteshregmi1234,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-43007 - PDF is not generated as expected