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

Free Support Forum - aspose.com

Kashida styles not working, when converting word to pdf

  1. When embedding HTML code which contains Kashida styles to word document and using below code able to update the styles to word document.
  com.aspose.words.Table table = doc1.getFirstSection().getBody().getTables().get(0);
  com.aspose.words.Cell firstCell = table.getFirstRow().getFirstCell();
  com.aspose.words.Paragraph para = firstCell.getFirstParagraph();

But when I use doc.save(docOutStream, com.aspose.words.SaveFormat.PDF); to convert to PDF, it’s not getting the KASHIDA styles.

@savinda90 Could you please attach your input and problematic output documents? We will check the issue and provide you more information.

pdfoutput.png (36.1 KB)
wordoutput.png (31.1 KB)

Hi Alexy,
I added the output of word and pdf. In the word it is working fine, but for pdf its not working.
Step to Reproduce:

  1. Create Word Template and place in server location.
  2. Write the code to pick the word template using Aspose
    3)Used InsertHtml method to embed the html to the merge filed in the template.
    (In the html we have below code which use Kashida style as below)
 <table cellspacing="0" cellpadding="0" border="0" rules="none">
                <td style="vertical-align:top;width:60%;">
                    <div class="ecp-resolution" style="text-align: justify; text-justify: kashida; text-kashida: 0%; line-height: 0px;">
                        <pega:when test="pyWorkPage.Request.IncludeAddresseName=='true' && pyWorkPage.Request.NameOfAddresse!=''">
                            <pega:when test="pyWorkPage.Request.PrefixNickName!=''">
                                <pega:reference name="pyWorkPage.Request.PrefixNickName" mode="text"></pega:reference>&nbsp;/
                            <pega:reference name="pyWorkPage.Request.NameOfAddresse" mode="text"></pega:reference>
                            <pega:when test="pyWorkPage.Request.TitleOfAddresse!=''">

But if we directly embed this html and create the word document its not adding the Kashida styles. But after inserting if I called below code, Kashida style is adding to the word document.

com.aspose.words.Table table = doc.getFirstSection().getBody().getTables().get(0);
com.aspose.words.Cell firstCell = table.getFirstRow().getFirstCell();
com.aspose.words.Paragraph para = firstCell.getFirstParagraph(); para.getParagraphFormat().setAlignment(com.aspose.words.ParagraphAlignment.ARABIC_LOW_KASHIDA);

But if we use below method to create pdf after adding all the above code to word document object, the output pdf file do not have the Kashida styles as attached as “pdfoutput”

doc.save(docOutStream, com.aspose.words.SaveFormat.PDF);

This is the issue we are facing currently. Word is working fine , but same code pdf is not working.

Thank you

Hi Alexy, Really appreciate if you can provide your inputs on above.

Thank you

@savinda90 Thank you for additional information. Aspose.Words does not support Kashida feature upon rendering documents. This feature request is logged as WORDSNET-11360 in our defect tracking system. We will keep you informed and let you know once this feature is implemented.
Could you please attach DOCX document produced by Aspose.Words on your side and the resulting PDF documents produced by MS Word and by Aspose.Words? This will help us to better understand your requirements and simplifies the problem analysis.

PDF with Kashida style issue.pdf (136.1 KB)
Word With Correct Kashida Styles.docx (115.9 KB)

Hi @alexey.noskov, the pdf document and word document attached herewith. As you can see when generating Word its adding the Kashida styles correctly, but for the same code if I use to save with PDF format, its not getting picked up.

Word and PDF Comparoson.png (90.1 KB)
Additionally a png file attached with the comparison between PDF and word

@savinda90 Thank you for additional information. I have added your document to the appropriate issue. We will keep you informed and let you know once Kashida feature is supported by our layout engine.

@alexey.noskov, BTW we already purchased the Aspose java.* license from you. So can I ask is there any way to track this issue under a Aspose Case ID. Also my Technical Lead needed to be added to this thread. Can you give me a solution for this.

Thank you

@savinda90 I have made this thread public so you and your Technical Lead can access it. Please do not worry about attached documents, only you and Aspose staff can download your files.

@alexey.noskov, Can we have estimation for this? (SLA). Because this is a blocker for us for going live.
Thank you.

@savinda90 Unfortunately, the issue is postponed, i.e. currently we cannot provide you any estimate when the feature will be delivered. I will consult with the developer responsible for this functionality and provide you more information.

@alexey.noskov, Can we schedule a meeting for this with the respective development team?

@savinda90 Unfortunately, we do not provide support via phone. The main place for interacting with development team is this forum.
I have consulted with the responsible developer and he promised to provide an approximate estimate at the end of next week. But I am afraid there will not be an exact date of delivery, since this is complex and big feature, which implementation is not straightforward.

@alexey.noskov, Hope you are doing good. Can I ask any update on the estimations.

Also is there any workarounds for the Kashida, when converting word to pdf?

@savinda90 There are three modes of Kashida style: Justify Low, Justify Medium, Justify High. We plan to implement the Justify Low mode first. The current approximate estimate for it’s implementation is about 3-5 month.
Once Justify Low is implemented we will be able to give an estimate for other two modes.

@alexey.noskov , Yes please start the development, Once done let us know.

@savinda90 We will be sure to inform you once this feature is supported.

Is this issue with Kashida resolved yet? how can we test the same. Appreciate your prompt response

@thariqskamal Unfortunately, no, the Kashida feature is not yet supported by Aspose.Words. Currently development of this feature has been postponed till later date.