Hi,
We have used old version of Aspose pdf(10.2.0) jar to implement html to pdf conversion and write text to pdf file.
Now we tried to use the latest(10.8.0) jar file of the same package as we moved our implementation to next level environment, and observed that there is an issue that when we write the text to the existing pdf file, text is truncated.
Please find the attached files for reference.
aspose.pdf.10.2.0.PNG – text displayed properly, as highlighted.
aspose.pdf.10.8.0.PNG – text is truncated, with the 10.8.0 version of the aspose jar file.
also attached the pdf files generated.
below is the code snippet used to generate/write text to pdf. Note that I have used the same code
snippet to write text to pdf file.
Table table1 = new Table();
table1.setColumnWidths(“85”);
//table1.setColumnWidths(“2”.equals(secVal)? “100” : “85”);//required to set the alignment of the lable
table1.setHorizontalAlignment(HorizontalAlignment.Center);
//table1.setBorder(new com.aspose.pdf.BorderInfo(com.aspose.pdf.BorderSide.All, Color.getBlue()));
//table1.setLeft(“2”.equals(secVal) ? 438 : 440);
table1.setLeft(440);
//table1.setTop(150);
Row row1 = table1.getRows().add();
page.getParagraphs().add(table1);
Cell cell1 = row1.getCells().add();
TextFragment name1 = new TextFragment(securityClass);
name1.getTextState().setFontSize(14);
name1.setHorizontalAlignment(HorizontalAlignment.Center);
if (!“1”.equals(secVal)) {
name1.getTextState().setForegroundColor(Color.fromArgb(172, 19, 19));
}
TextFragment text = new TextFragment("");
text.getTextState().setFontSize(4);
cell1.getParagraphs().add(text); //leave one paragraph space
cell1.getParagraphs().add(name1);
Please let me know if more details required.
Thanks in advance.