Hello ,
we are testing linq report engine functionality of Aspose word java for document generation. When saving documents as PDF using java words Japanese language does not render properly in PDF
Syntax
templateDocument.save(outStream,saveFormat); //outStream is outputStream and saveFormat is PDF,docx etc
{
"node": {
"cusStringMap": {
"190": "Lavar a máquina en frío",
"191": "Lavage en machine à froid",
"192": "Maschinenwäsche kalt",
"193": "洗濯機コールド",
"194": "はい。"
}
}
}
We have attached template file for your ref and also generated document output PDF file in which Japanese language is not getting properly rendered. Please check
We have one more question
We saw that linq report has doc tag to embed a document. Is there a way to add OLE object using linq report engine, If not is it in the road map ?
@Ajinkya281991 No, unfortunately, there is no way to insert embedded OLE objects into the report using LINQ Reporting Engnine.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-17245
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@Ajinkya281991 Could you please save your output document as DOCX and as PDF and attach the documents here for our reference? We will check the issue and provide you more information.
@Ajinkya281991 Thank you for additional information. As I can see the output looks correct in DOCX document. So the problem is definitely with fonts. if convert your output to PDF with required fonts, the output looks fine: out.pdf (54.5 KB)
If convert the same document without fonts the output looks incorrectly: out_without_fonts.pdf (25.7 KB)
As I can see the following fonts are used in your output:
Thanks for your response,
We have followed below approach and above issue is resolved.
Copying Fonts from a Windows Machine
An easy and quick way to get TrueType fonts on a Linux system is to copy .TTF and .TTC files from the C:\Windows\Fonts directory on a Windows machine to some directory on your Linux machine. You do not need to install or register these fonts on Linux in any way; you just need to specify the location of the fonts using the FontSettings class in Aspose.Words
**Documentation mention **
Different Linux distributions may store fonts in different folders. Aspose.Words looks for fonts in several locations. By default, Aspose.Words looks for the fonts in all of the following locations: /usr/share/fonts, /usr/local/share/fonts, /usr/X11R6/lib/X11/fonts. This default behavior will work for most Linux distributions, but it is not guaranteed to work all of the time, in which case you might need to specify the location of true type fonts explicitly. To do this, you need to know where TrueType fonts are installed on your Linux distribution.
Q1: After specifying custom font folder path in font setting and providing it template like
eg. doc.setFontSettings(fontObkect);
Will the aspose still look in the above location for the fonts ?
Q2: Warning from documentation
“Verify whether font licensing is required, and read the EULA carefully before installing MS Fonts on any Linux operating system.”
Is this for copying font approach from windows and placing them in linux machine
OR is this for installing trueType in Linux system approach
For ref: Install TrueType Fonts on Linux in Java|Aspose.Words for Java
You can specify custom font source in default font setting once per application domain and Aspose.Words will use these fronts for rendering all document:
FontSettings.getDefaultInstance().setFontsSources(new FontSourceBase[] { new SystemFontSource(), new FolderFontSource("C:\\Temp\\fonts", true) });
For both. You should keep in mind the EULA of fonts that will be used for rendering documents in your application.