Hi team,
I have a docx file that contains few parts of the document text in german. So when using the cloud api , the german chars are rendering fine but when using the onpremise thegerman chars are not rendering.
Can you please suggest which font [ttf] needs to be added inorder to render the german chars.
@Uzair_Sayeed Could you please attach your problematic output document here for our reference? I have checked conversion on my side and the output looks correct: out.pdf (145.3 KB)
Hi @alexey.noskov , thanks for quick response.
And I hope you are using aspose words onpremise node.js for the conversion[out.pdf file]
@Uzair_Sayeed Unfortunately, I do not see any problems in the attached PDF. If possible could you please highlight the problem?
Actually, there is no on-premises version of Aspose.Words for node.js. Aspose.Words on-premises is availabe for .NET, Java, Python and C++. Could you please share the code you use code conversion? Also as I can see the producer of the attached PDF is not Aspose.Words.
Sorry @alexey.noskov , my mistake I’ve sent the wrong output pdf file.
Here’s the actual output file:
We are using aspose onpremise via Node.js for quite sometime.
Code:
docxToPdfConverterAsposeV3: async (inputDocxFilePath) => {
try {
var axios = require('axios');
var FormData = require('form-data');
var fs = require('fs');
const asposeDocxToPdfUrl = getAsposeDocxToPdfUrl();
var data = new FormData();
data.append('document', fs.createReadStream(inputDocxFilePath));
var config = {
method: 'put',
// url: 'http://aspose-words-cloud.document-service-backend.svc.cluster.local/v4/words/convert?format=pdf&fileNameFieldValue=sourceFilename',
url: asposeDocxToPdfUrl,
headers: {
'accept': 'application/octet-stream',
'Content-Type': 'multipart/form-data',
...data.getHeaders()
},
data: data,
maxContentLength: 50000000,
maxBodyLength: 50000000,
responseType: 'stream'
};
let result = await axios(config)
return {
contentType: result.headers['content-type'],
filestream: result.data
};
} catch (error) {
let apiError = new APIError('50090', error, 'Aspose - Internal Server Error');
logger.error(`Error occured while converting docx file to pdf`, apiError);
throw apiError;
}
},
In the above code, ‘aspose-words-cloud’ is the name of our kubernetes deployment and ‘document-service-backend’ is the namespace used. We are hitting the aspose pod svc url from our backend url.