I am getting gateway timeout error. The file size is 10.8 MB.
public async Task ConvertLocalPdfToHtml(string pdfFilePath, string outPutHtmlFile)
{
try
{
var wordsApi = new WordsApi(new Configuration { ClientId = Setting.AsposeConfig.ClientId, ClientSecret = Setting.AsposeConfig.ClientSecret, Timeout = Convert.ToInt32(TimeSpan.FromMinutes(10).TotalSeconds) });
var fileInfo = new FileInfo(pdfFilePath);
var requestDocument = fileInfo.OpenRead();
var convertRequest = new ConvertDocumentRequest(requestDocument, "html");
var actual = await wordsApi.ConvertDocument(convertRequest);
var fileStream = System.IO.File.Create(outPutHtmlFile);
actual.CopyTo(fileStream);
fileStream.Close();
return new JobResult { success = true };
}
catch (Exception ex)
{
return new JobResult { success = false, message = ex.StackTrace };
}
}