Justified Paragraph Issue in Aspose.Words

Hello,
When we use insertHtml method of Aspose.Words to create PDF from word document, last line of the justified paragraph doesn’t seem OK. The last line streches both sides which makes a bad effect.
For example:

<P align="justify">Müdürlüğünüzde X XXXX XX XX XXXXXXX XXX XX XX sicil sayılı dosyada işlem gören ve XXXXX Xxx. Taah. San. ve Tic. Ltd. Şti firmasına ihale ederek teslim almış olduğumuz Xxxxx Xxxxx Xxxxx Xxxxxx yapım işine dair İlgi (X) yazınız ile istenen bilgiler takip eden sayfada yer almaktadır.</P>

Instead of align attribute, when we use <P style="TEXT-ALIGN: justify"> , paragraph seems OK. But our editor component does not allow us to do so. What can be the solution to this?
Regards

Hi

Thanks for your inquiry. I cannot reproduce the problem on my side. I use the following code for testing:

// Create document and DocumentBuidler object
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert HTML.
string html = "<P align=\"justify\">Müdürlüğünüzde X XXXX XX XX XXXXXXX XXX XX XX sicil sayılı dosyada işlem gören ve XXXXX Xxx. Taah. San. ve Tic. Ltd. Şti firmasına ihale ederek teslim almış olduğumuz Xxxxx Xxxxx Xxxxx Xxxxxx yapım işine dair İlgi (X) yazınız ile istenen bilgiler takip eden sayfada yer almaktadır. </P>";
builder.InsertHtml(html);
// Save output document in PDF format.
doc.SaveToPdf(@"Test013\out.pdf");

The output PDF looks fine (I attached it here). I use the latest version of Aspose.Words for testing. You can download it from here:
https://releases.aspose.com/words/net/

Best regards,

Hello,
Sorry for the late reply,
Problem is caused by the <br> tags inside the justified <p> tag. Aspose treats the line after <br> tag as the last line and leaves it aligned to left. But the lines before the <br> tag are justified. I attached the the sample pdf output created via the below code.
Regards
PS:In the first post, I described the problem incorrectly, sorry for this.

Aspose.Words.Document dosyaPdf = new Aspose.Words.Document();
Aspose.Words.DocumentBuilder dosyaPdfPdfBuilder = new Aspose.Words.DocumentBuilder(dosyaPdf);
dosyaPdfPdfBuilder.InsertHtml("<html><head><style type=\"text/css\">body{font-family:Arial;font-size:12px;} .baslik{font-weight:bold;}</style></head><body><center><table border=\"0\" width=\"100%\"><tr><td colspan=\"5\"><html><body><p align=justify>Müdürlüğünüzde X XXXX XX XX XXXXX XXX XX XX sicil sayılı dosyada işlem gören ve XXXXX İnş. Taah. San. ve Tic. Ltd. Şti firmasına ihale ederek teslim almış olduğumuz Xxxxx xxxx x scscsc xsxsxdcd df df d frfgrfgrgr rgrgrg<br><br><br><br>Xxxxxx Xxxxxx Xxxxxx yapım işine dair İlgi (1) .</p></body></html></td></tr></html>");
dosyaPdfPdfBuilder.PageSetup.PaperSize = Aspose.Words.PaperSize.A4;
dosyaPdfPdfBuilder.PageSetup.LeftMargin = Convert.ToDouble(Aspose.Words.ConvertUtil.MillimeterToPoint(20));
dosyaPdfPdfBuilder.PageSetup.RightMargin = Convert.ToDouble(Aspose.Words.ConvertUtil.MillimeterToPoint(20));
dosyaPdfPdfBuilder.PageSetup.LeftMargin = Convert.ToDouble(Aspose.Words.ConvertUtil.MillimeterToPoint(20));
dosyaPdfPdfBuilder.PageSetup.RightMargin = Convert.ToDouble(Aspose.Words.ConvertUtil.MillimeterToPoint(20));
dosyaPdf.Save(@"c:\deneme.pdf", Aspose.Words.SaveFormat.Pdf);

Hi

Thank you for additional information. I managed to reproduce the problem on my side and linked your request to the appropriate issue. You will be notified as soon as it is resolved.
Best regards.

The issues you have found earlier (filed as WORDSNET-2253) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan