We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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.

Instead of align attribute, when we use

, 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<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

// Insert HTML.

string html =

"

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.

";

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:
http://www.aspose.com/community/files/51/file-format-components/aspose.words-for-.net-and-java/category1188.aspx

Best regards,

Hello,

Sorry for the late reply,

Problem is caused by the
tags inside the justified

tag. Aspose treats the line after
tag as the last line and leaves it aligned to left. But the lines before the
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("body{font-family:Arial;font-size:12px;} .baslik{font-weight:bold;}

");

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);

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



Xxxxxx Xxxxxx Xxxxxx yapım işine dair İlgi (1) .

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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