Hi,
I am Converting a Word file(contains font “Royal Arabic”.) to PDF.
The Output PDF file have different font.
I am using aspose-words-19.4-jdk17.
and using this code
FileInputStream fstream = new FileInputStream("D:/workspaces/PSD2020/PSD/WEB-INF/" +
"Aspose.Total.Product.Family.lic");
com.aspose.words.License licence=new com.aspose.words.License();
licence.setLicense(fstream);
com.aspose.words.Document wordDocument = new
com.aspose.words.Document("C:\\Users\\CTC18\\Desktop\\testDoc.docx");
wordDocument.save("C:\\Users\\CTC18\\Desktop\\outPutPdf2.pdf");
You can check doc file and output PDF file here Samplefiles.zip (46.5 KB)
No such method “setTextShaperFactory” available there .
And also “com.aspose.words.shaping.harfbuzz” no such package in aspose words.
Please check this.
I am using aspose-words-19.4-jdk17.jar.
You need to upgrade to the latest version of Aspose.Words for Java to be able to use Text Shaping Harfbuzz features. I have installed the font and then used the following simple code to convert ‘testDoc.docx’ to PDF format on my end (see awjava-20.11-after installing font.pdf (17.6 KB)).
Document doc = new Document("C:\\Temp\\SampleFiles\\testDoc.docx");
doc.save("C:\\Temp\\SampleFiles\\awjava-20.11.pdf");
I can spot a problem (see problem.png (17.0 KB)) and logged it in our issue tracking system with ID WORDSNET-21497. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.
Can you send me please the sample code that you used and the latest version of Aspose.words that you used.
As I downloaded from here Aspose.Words | Java Library to Process Document Formats
It is still giving me compilation error.
doc.getLayoutOptions().setTextShaperFactory(com.aspose.words.shaping.harfbuzz.HarfBuzzTextShaperFactory.getInstance());
this method “setTextShaperFactory” is available there now .
But “com.aspose.words.shaping.harfbuzz” no such package in aspose words.
The issue still remains even when using the licensed latest version of Aspose.Words. To address this problem of square boxes in PDF, we have logged a separate issue with ID WORDSNET-21515. (see 20.11-HarfBuzz.pdf (11.1 KB))
If you want to test ‘Aspose.Words for Java’ without the evaluation version limitations, then you can also request a 30-day Temporary License. Please refer to How to get a Temporary License?
But How it is working for you in the sample you sent me before? while I am getting the square boxes.
And can you please give me any idea that how much time it will take to get response from developers team on logged issues? WORDSNET-21497 WORDSNET-21515
WORDSNET-21497 and WORDSNET-21515 are currently pending for analysis and are in the queue. We will inform you via this forum thread as soon as these issues will get resolved in future. We apologize for any inconvenience.
And also we need to add an other Font ‘Fanan Font’ Fanan.zip (30.6 KB)
Same issue, we are facing with this font also.
Please see the out put pdf file. outPutPdf2.pdf (47.1 KB)
I used this code
FileInputStream fstream = new
FileInputStream("C:/Users/muk/Desktop/Aspose/AsposeTempLicense22-12-2020/" +
"Aspose.Total.Java.lic");
com.aspose.words.License licence=new com.aspose.words.License();
licence.setLicense(fstream);
com.aspose.words.Document doc = new
com.aspose.words.Document("C:/Users/muk/Desktop/Aspose/Fananfont/fananFontDoc.docx");
doc.getLayoutOptions().setTextShaperFactory(com.aspose.words.
shaping.harfbuzz.HarfBuzzTextShaperFactory.getInstance());
// Render the document to PDF format
doc.save("C:/Users/muk/Desktop/Aspose/Fananfont/outPutPdf2.pdf");
I am afraid, your issues are pending for analysis and are in the queue. We will inform you via this forum thread as soon as linked issues will get resolved in future. We apologize for any inconvenience.
Please also ZIP and upload corresponding Word document here for further testing.