HTML to PDF conversion style/formatting issue

Hi,
I 'm converting HTML string to pdf and adding paging, header and footer in Aspose.PDF C# code via HtmlFragment.

I’m facing the issue of formatting the text, which works correctly in html content, after the pdf conversion the alignment goes weird.

Below is the sample HTML


<p style="padding-top: 12pt; text-align: justify;">
<span style="white-space: pre-wrap; margin-right: 10px;">Built in 1847 and rebuilt in 2020, the bridge consists of steel girders composite with a reinforced concrete deck superstructure supported by reinforced concrete abutments and piers. The structure has twenty-one spans that are a combination of simply and continuously supported, with a total length of approximately 2491 feet and a maximum span length of 257 feet.
The anticipated scope of bridge rehabilitation is as follows:
x Strengthen or repair steel members.
x Field paint steel repair areas and other areas with rust
x Bearing replacement/repair 
x Repair existing deck slab with Strip, Patch, Membrane, and Overlay (SPMO)
x Replace all joints on the bridge in kind.
</span>
	</p>

Issue is text-align justify and white-space wrap properties.
Need a help on this , please

@Sendil.M

Would you please share the sample code snippet and generated output PDF as well? We will test the scenario in our environment and address it accordingly. Also, please use 25.1 version as it is the latest one before sharing the requested information.

Thank you for your response.

I have tried with latest version too.

Code:

var document = new Document();
var page = document.Pages.Add();
var htmlFragment = new HtmlFragment(pdfContent);
page.Paragraphs.Add(htmlFragment);
var documentStream = new MemoryStream();
document.Save(documentStream, SaveFormat.Pdf);

pdfContent – contains the html string

After this adding page number, header footer falls.

@Sendil.M

We are sorry that we could not understand clearly. Can you please share a screenshot and output PDF as well so that we can better understand the issue you are facing and investigate it accordingly.

I have the shared code and the html where I have used.

I have been expecting the output to be like with justified alignment
image.png (63.4 KB)

But I’m getting the pdf generated as

image.png (68.2 KB)

It works good if I give text-align: left, but not for text-align:justify
Hope you can see the difference, please let me know in case of any additional details.

@Sendil.M

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-59181

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thank you for the update.

So, what’s the next step on it? Do I need to wait and watch this space?

I have been using the licensed version of the product, which means I have paid for it, in case of any issues do I need to buy the support too, to solve the issue in the licensed product? Just trying to understand, please.

Thanks

@Sendil.M

With standard license purchase, you are entitles to obtain free support and report issue in free support forum. The issues in free support forum are resolved on a first come first serve basis and their resolution time depends upon the number of issues logged prior as well as their nature and complexity. We will keep you posted via this forum thread about the issue progress.

In case issue is a showstopper and needs to be resolved on urgent basis, we advise using paid support channel to escalate the ticket to the highest priority. However, you will need to purchase the subscription of paid support in order to do that.

Thanks for the update, I will wait for the response. Yes it’s a show stopper, but have to talk to customer about the paid support, since we picked this tool after a long approval, its a quiet long process.

@Sendil.M

Sure, please take your time. In the meanwhile, we will inform you once we have some progress update.