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

Free Support Forum - aspose.com

PDF does not get generated properly


I have a template that gets saved great as DOCX document, but not accurate as PDF. the proplem is with listed items in NumberStyle.Arabic1 & NumberStyle.Arabic2, other number styles are fine.

the result on word file is like :
1. السؤال الأول:
أ. جواب أول
ب. جواب اثنان
ج. جواب ثالث
د . جواب رابع

but in pdf:
1. السؤال الأول:
أ. جواب أول
ب. جواب اثنان
ج. جواب ثالث
د. جواب رابع

also the direction is RTL (not as it appears here on this page).
Hi Ali,

Thanks for your inquiry. Could you please attach your input Word document here for testing? We will investigate the issue on our side and provide you more information.

Ok, here is my simple code:

string template = “C:\Users\USERNAME\Documents\template.docx”;
Document doc = new Document(template);
DocumentBuilder builder = new DocumentBuilder(doc);
//builder.InsertHtml(" السؤال الأول");
builder.ListFormat.ListLevelNumber = 2;
builder.ListFormat.List = doc.Lists.Add(Aspose.Words.Lists.ListTemplate.NumberArabicDot);
builder.ListFormat.List.ListLevels[2].NumberStyle = NumberStyle.Arabic2;
for (var i = 1; i <= 5;i++ )
builder.InsertHtml("الإجابة رقم " + i.ToString() + “”);
doc.Save(template.Replace(".docx", ".pdf"));

you may also see the result in the pdf file

Hi Ali,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14494. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

thank you, i will be waiting.

The issues you have found earlier (filed as WORDSNET-14494) have been fixed in this Aspose.Words for .NET 17.1.0 update and this Aspose.Words for Java 17.1.0 update.

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

I just tested it and it worked, thank you very much.