Hi @andrey.gubal
Latency is very high.For very simple and small html file.
This sync api is taking 7 seconds time.
Handlebars Test
Handlebars Iteration Test
<ul>
<li>
<strong>First Item:</strong>
<strong>Index 0:</strong> abc
</li>
<li>
<strong>Index 1:</strong> xyz
</li>
<li>
<strong>Last Item:</strong>
<strong>Index 2:</strong> 123
</li>
</ul>
Adding my code for ur reference
const api = require(‘@asposecloud/aspose-html-cloud’);
const path = require(“path”);
const fs = require(“fs”);
// Auth Configuration
const conf = {
basePath: “https://api.aspose.cloud/v4.0”,
authPath: “https://api.aspose.cloud/connect/token”,
apiKey: “xxxxxxxxxxxxxxx”,
appSID: “xxxxxxxxxxxxxxxxxxx”,
defaultUserAgent: “NodeJsWebkit”
};
// Create Conversion API object
const conversionApi = new api.ConversionApi(conf);
// Define input and output paths
const inputHtmlPath = path.join(__dirname, “outputhtml/outputtest7req4.html”);
const outputPdfPath = path.join(__dirname, “outputpdf/asposecloud_testreq41df.pdf”);
// Optional options
const opts = null;
// Latency Logging Start
const startTime = Date.now();
conversionApi.convertLocalToLocal(inputHtmlPath, outputPdfPath, opts, function (error, data, response) {
const endTime = Date.now();
const latencyMs = endTime - startTime;
console.log(‘dat==’, data);
console.log(‘response==’, response);
if (error) {
console.error(" Conversion failed:“, error.message);
} else {
console.log(” Conversion succeeded!“);
console.log(” Output file saved to:", outputPdfPath);
}
console.log(`Latency: ${latencyMs} ms`);
});
Can you please suggest if any changes are required or how to improve this