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

Free Support Forum - aspose.com

Image squished instead of moving to next page

Hi,





I am using Aspose.pdf 11.8.

I have a table with two columns and multiple rows. In first cell I am inserting image and in second cell some text. In some cases image is getting squished when there is no room for it instead of moving to next page. How can I fix

this.





Here is sample code.

Table table = new Table();

table.setColumnWidths(“3% 97%”);



for(int i=0;i
Row row = table.getRows().add();

row.setRowBroken(true);



Cell cell = row.getCells().add();

cell.setMargin(new MarginInfo(-25,15,0,10));

cell.setVerticalAlignment(VerticalAlignment.Top);

Image logoimg = new Image();

logoimg.setImageStream(new FileInputStream(“d:/pdf/weight.png”));

logoimg.setFixHeight(37.44);

logoimg.setFixWidth(37.44);



cell.setAlignment(HorizontalAlignment.Right);

cell.setVerticalAlignment(VerticalAlignment.Top);

cell.getParagraphs().add(logoimg);

cell = row.getCells().add();

cell.setMargin(new MarginInfo(0,0,0,10));

cell.setAlignment(HorizontalAlignment.Left);

cell.setVerticalAlignment(VerticalAlignment.Top);

TextFragment fgmt = new TextFragment(“Weight”);

fgmt.setMargin(new MarginInfo(0,10,0,15));

fgmt.getTextState().setFontStyle(FontStyles.Bold);

fgmt.getTextState().setFontSize(12.5f);

fgmt.getTextState().setFont(FontRepository.findFont(“Palatino Linotype”));

cell.getParagraphs().add(fgmt);



HtmlFragment fgmt1 = new HtmlFragment(“

Testing hksjkjyskds khkjhk kjhkjhjhhh kjhkjhkhkhk dkhfjkdhfjhdfhd Testing hksjkjyskds khkjhk kjhkjhjhhh kjhkjhkhkhk kjhkjhjhhh kjhkjhkhkhk dkhfjkdhfjhdfhd fdfdfdfdf dfdfdfdfdf dfdfdfdfdf

”);

cell.getParagraphs().add(fgmt1);

}

page.getParagraphs().add(table);





I have included pdf also. If you notice image is squished on page 2.



Thanks

Mamatha

Hi Mamatha,


We are sorry for the inconvenience. I have tested the scenario and noticed the squished image issue, so logged a ticket PDFJAVA-36147 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

Best Regards,

Hi Tilal,





I have noticed similar issue reported few months back.



Images not rendered to next page



When will this issue be fixed? Are there any workarounds for it?



Thanks

Mamatha

Hi Mamatha,


Thanks for your findings. I am afraid the subjected issue is still not resolved and it seems to be related to your issue. However, I am afraid we cannot share any workaround at the moment, please wait for the issue resolution.

We are sorry for the inconvenience.

Best Regards, .

This is very crucial for us. Can u please provide ETA for it. We recently purchased license and we are close to our release.


Ion a high level do u know why this is not working. Is it because of image type or by dimensions.

Thanks
Mamatha

Hi Mamatha,


Thanks for your feedback. I am afraid we can not share any ETA until the issue investigation is completed. However, I have passed on your concern to our product team and requested to complete the analysis and share an ETA at their earliest. I will notify you as soon as some information is available.

We are sorry for the inconvenience.

Best Regards,

The issues you have found earlier (filed as PDFJAVA-36147) have been fixed in Aspose.Pdf for Java 16.11.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.