Rendering HTML content with p tag in PDF

Hi,

I am trying to set segment content with html content. Html content has p tag in it. I have two issues:

1. if content has "P" (Capital P tag) content is loosing it's case. All are rendered in lower case.

2. lot of space is getting added before a paragraph.

str="

It was a pleasure to see you .

"+
"

Thank You

";

How can I preserve case and spacing.

Thanks

Mamatha

Hi Mamatha,


I am testing this scenario and will get back to you soon. We are sorry for the delay and inconvenience.

Hi,

Any update on this.

Thanks

Mamatha

mamatha:
I am trying to set segment content with html content. Html content has p tag in it. I have two issues:

1. if content has “P” (Capital P tag) content is loosing it’s case. All are rendered in lower case.

Hi Mamatha,

Thanks for your patience.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFJAVA-33152. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We apologize for your inconvenience.

mamatha:
2. lot of space is getting added before a paragraph.

str="

It was a pleasure to see you .

"+
"

Thank You

";

For this particular issue, do you mean the extra Top spacing between two paragraphs i..e. as present between "it was a pleasure to see you", . and "thank you" paragraph. Please share further details so that we may further look into this problem. For your reference, I have also attached the resultant PDF that I have generated.

Hi Mamatha,


Thanks for your patience.

I am pleased to share that the issue reported earlier has PDFJAVA-33152 is resolved in latest release version of Aspose.Pdf for Java 3.3.0. For your reference, I have also attached the resultant PDF which I have generated over my end. Please take a look.

In the event of any further query, please feel free to contact.

Hi,

First issue is fixed.

Second issue is not fixed. Still there is spacing between two paragraphs.

Thanks

Mamatha

Hi Mamatha,


I have tested the scenario using Aspose.Pdf for Java 3.3.0 while using the following code snippet and I am unable to notice any problem. For your reference, I have also attached the resultant PDF file.

[Java]

String str = “It was a pleasure to see you .


+<o:p></o:p>

"Thank You

";

//Instantiate Pdf pbject by calling its empty constructor

Pdf pdf1 = new Pdf();

//Create a new section in the Pdf object

Section sec1 = pdf1.getSections().add();

//Create a new text paragraph and pass the text to its constructor as argument

Text text1 = new Text(str);

text1.setIsHtmlTagSupported(true);

sec1.getParagraphs().add(text1);

pdf1.save("d:/pdftest/HTML_Text_File_to_PDF.pdf");

I am also getting same amount of spacing. Is there a way to reduce that spacing so that both paragraphs come one below.

Thanks for looking into it.

-Mamatha

mamatha:
I am also getting same amount of spacing. Is there a way to reduce that spacing so that both paragraphs come one below.
Hi Mamatha,

I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFJAVA-33170. We will investigate this issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

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


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