Free Support Forum - aspose.com

Re: PDFANDROID-176 (Text is not bold- line isn't seen)

Hi,


We have tested the scenario again with the 1.7.0 version and its working for text to be Bold. So thank you for that, but when we are using the latest version 1.7.0 we are facing the issue that I mentioned before i.e it is taking too much time to generate the PDF as compared to version 1.6.0. So can you please suggest any alternative solution why we are facing the issue in 1.7.0 and not in 1.6.0.

Thanks,
Hello

We are making an Android application that generates the pdf using some data.We have used the Aspose.Pdf for Android 1.7.0 in our application but it will take too much time as compare to 1.6.0 version

Many of our issues will solve aftre using 1.7.0 version like
  1. Text Bold
  2. Rounded border
  3. Write png image in PDF
Note :-> 1.7.0 version will take too much time to generate PDF as compare to 1.6.0

Please help us regarding this


Thanks

Hi Kalpit,


Can you please share some details regarding the performance difference which you have observed while using latest release version, as compared to earlier release, so that we can further look into this matter.

Also please share that you have observed performance difference while generating simple PDF file with one TextFragment or its appearing in some complex scenario.

We are sorry for this inconvenience.
Hi,
Thanks for your reply. Differnece that we came across while using both the versions is mentioned below. And we found that though Aspose.pdf 1.7.0 solves issues of text bold effect and write.png images, but the major issue we are facing is the time it take to generate the pdf file. By using only single line i.e of "m_valueState.setFontStyle(FontStyles.Bold)" in version 1.7.0 it takes too much time. And if we remove that line the generation in much faster (for simple files not for complex pdf generation). Complex files are taking more than 15 min without any bold effect applied to it. So we are not able to predict actually why we are facing such issue with 1.7.0.

Aspose.pdf 1.7.0 :
While implementing simple table having 3 rows and without bold property, time to generate pdf - 20 sec
While implementing simple table having 3 rows and applying bold property to text, time to generate pdf- 2 to 3 mins
With two images and simple table having 3 rows and without bold property, time to generate pdf - 20 to 30 sec
With two images and simple table having 3 rows and with bold property, time to generate pdf- more than 3 mins

Aspose.pdf 1.6.0 :
With two images and simple table having 3 rows and without bold property, time to generate pdf-15 sec
With two images and simple table having 3 rows and with bold property, time to generate pdf- bold not seen

For complex files :
Aspose.pdf 1.7.0 :
Without bold effect : Takes too much time :-> aprx 15 min (so there is no need to use 1.7.0 as 1.6.0 can also generate file without bold and that to faster than this).

This issue is verry critical , please help us regarding this , If possible can you please solve this issue as soon as possible


Thanks,

Hi Kalpit,


Thanks for sharing the information. We will test the described scenarios and will let you know our findings soon.

We are sorry for the inconvenience caused.

Best Regards,

Hi Kalpit,


Thanks for your patience. During my investigation with Aspose.Pdf for Android 1.7.0 and 1.6.0, I could not notice any major performance lag in both versions but milliseconds. I have used following code with Android Studio 1.2.2 and my Android device. Please share your environment details and sample code so we will investigate it further.

A table with three rows and bold text:

1.7.0 27.077 sec
1.6.0 NPE exception

A table with three rows and without bold text:

1.7.0 9.238 sec
1.6.0 9.113 sec


Document m_doc = new Document();

Page m_page = m_doc.getPages().add();



com.aspose.pdf.Table m_banner = new
com.aspose.pdf.Table();

m_page.getParagraphs().add(m_banner);

m_banner.setColumnWidths(“300”);



com.aspose.pdf.Row m_row = m_banner.getRows().add();

com.aspose.pdf.Cell m_cell = m_row.getCells().add();

m_cell.getParagraphs().add(new TextFragment(“row1”));

com.aspose.pdf.Row m_row1 = m_banner.getRows().add();

com.aspose.pdf.Cell m_cell1 = m_row1.getCells().add();

m_cell1.getParagraphs().add(new TextFragment(“row2”));

com.aspose.pdf.Row m_row2 = m_banner.getRows().add();

com.aspose.pdf.Cell m_cell2 = m_row2.getCells().add();

m_cell2.getParagraphs().add(new TextFragment(“row3”));



TextFragment fragment = new TextFragment("");

TextSegment segment = new TextSegment("
This is a sample text."
);

TextState m_headerState = new TextState();

m_headerState.setFontSize(15);

m_headerState.setForegroundColor(com.aspose.java.awt.Color.BLACK);

//m_headerState.setFontStyle(FontStyles.Bold);

segment.setTextState(m_headerState);

fragment.getSegments().add(segment);

m_page.getParagraphs().add(fragment);



m_doc.save(outputPath);<o:p></o:p>

We are sorry for the inconvenience caused.


Best Regards,