Hi Sergei Shibanov,
PFB my answer of your queries.
- Is it possible use only first two lines for reproduce issue?
Answer- Yes
Answer - htmlString as read html from file as string and pass it, which I have shared.
HtmlLoadOptions options = new HtmlLoadOptions();
var pdfDocument = new Aspose.Pdf.Document(htmlString, options);
Answer - Above Line is throwing error after deploying on aks docker container
htmlString
- name of the file to be converted (“ReportsSummarypptx.html”) or something else?
Answer - Yes **htmlString is html which is read form**
(“ReportsSummarypptx.html”) file
If all code must used please explain what the environment shows as errors (in the screenshot it is shown underlined by the environment). _logger
I can remove, and what about else.
Answer - Yes You can remove _looger it is being used for log the event only and you can remove underlined error and other error you can remove and the environment is kubernates docker container pods.
· What type of project is used - is it possible to reproduce this in a console application for .Net 6?
Answer - I am using Web Api project with Net 6 core and I am not sure console application will work on aks environment.
The below code is working fine on my local machine-
static readonly string textFile = @ “C:\Temp\Data\ ReportsSummarypptx.html”;
public static void ConvertHTMLtoPPTX()
{
if (File.Exists(textFile)) {
// Read entire text file content in one string
string text = File.ReadAllText(textFile);
// load HTML with an instance of Document
var document = new Document(text, new HtmlLoadOptions());
// save document in PPTX format
document.Save(“output.pptx”, Aspose.Pdf.SaveFormat.Pptx);
}
}
Best Regards,
Sukhvinder Singh