PdfApi api = new PdfApi("xxxxxxxxxxxxxxxxxxxxxxxxx", "xxxxxx-xxxx-xxxxx-xxxx-xxxxxxxx");
string localFolder = "C:/Temp/";
string TempFolder = "Temp";
string name = "blankpages.zip";
string htmlFileName = "blankpages.html";
var file = System.IO.File.OpenRead(localFolder + name);
await api.UploadFileAsync(TempFolder + "/" + name, file);
int height = 650;
int width = 250;
string resultName = "fromHtml.pdf";
var response = api.PutHtmlInStorageToPdf(resultName, Path.Combine(FolderName, name), htmlFileName, height, width, dstFolder: FolderName);
When I call this I am getting this error.
Aspose.Pdf.Cloud.Sdk.Client.ApiException: 'Error calling PutHtmlInStorageToPdf: {"RequestId":"72571779-2b5f-48b4-9901-310af657750f","Error":{"Code":"errorWindowsAzureStorage","Message":"Windows Azure Storage exception: The remote server returned an error: (404) Not Found.","Description":"Operation Failed. Windows Azure Storage Error.","DateTime":"2023-12-20T05:54:50.2829783Z","InnerError":null}}'
It seems you are unable to find the folder/file in your cloud storage. Please double check that you have configured your cloud storage correctly in the aspose.cloud dashboard and you can browse it in dashboard files tab.
// Convert HTML file to PDF
var convertResponse = pdfApi.PutHtmlInStorageToPdf(name: manifest.Output.OutputFileName, srcPath: manifest.Template.DocumentTemplate, height: height, width: width, marginLeft: left_margin, marginBottom: bottom_margin, marginRight: right_margin, marginTop: top_margin);
This srcPath: manifest.Template.DocumentTemplate is in another container called templates. When I call this its looking this file inside outputcontainer. I tried to pass local html file for this as below.
As suggested above that please double check that you have configured your cloud storage in aspose.cloud dashboard correctly and can view your storage files folders in it.