Helllo Everyone.
I have binded ftp storage wth my account. I have facing Error code 553 while trying to convert pdf to html. Here is the error details.
An unhandled exception of type ‘Aspose.Pdf.Cloud.Sdk.Client.ApiException’ occurred in Aspose.Pdf.Cloud.Sdk.dll
Additional information: Error calling PutPdfInRequestToHtml: {“RequestId”:“cfcd1d19-2fba-403c-8927-8f4e0cced241”,“Error”:{“Code”:“errorFtpStorage”,“Message”:“Ftp Storage exception: Status: ProtocolError Message: The remote server returned an error: (553) File name not allowed.”,“Description”:“Operation Failed. Ftp Storage Error.”,“DateTime”:“2023-05-08T10:40:55.974747Z”,“InnerError”:null}}
Please ensure that you have configured FTP storage correctly with aspose.cloud, as suggested in the following documentation. And can access your storage in aspose.cloud dashboard. Otherwise, please share your sample code along with your credentials for the investigation.
Ftp is connecting in filezilla client. I also verify it by clicking verify button in the storage and it told me that ftp is valid. here is my ftp configuration.
Please note the PutPdfInStorageToHtml API expects input files from cloud storage. Please kindly ensure that your referenced PDF file is uploaded correctly to your cloud storage and you are passing the correct file path from cloud storage in the PutPdfInStorageToHtml API call. If the issue still persists, then please share your credentials via a private message. For private message, click on my user icon and use the message option for it.
You need to use UploadFile to upload files to your cloud storage. If you are updating files to default storage, set in application in aspose.cloud dashboard, then you do not need to pass the storage name. Otherwise pass the storage name in the API call as well. Please check the following sample code for reference.
String storageName = "Mystorage";
// Initialzie Aspose.PDF Cloud API
// Get Cilent ID and Client Secret from https://dashboard.aspose.cloud/
PdfApi pdfApi = new PdfApi(ClientSecret, ClientId);
// Upload source PDF file to aspose cloud storage
pdfApi.UploadFile(remoteFolder + "/" + fileName, System.IO.File.OpenRead("C:/Temp/02_pages.pdf"), storageName);
Thanks for sharing your sample document. I am unable to notice any issues. Please see the sample code for reference.exempt.zip (77.6 KB)
public static async Task ConvertPDFtoHTMLStorage_PDF()
{
// instantiate the PdfApi
PdfApi pdfApi = new PdfApi(ClientSecret, ClientId);
string name = "exempt.pdf";
string resultName = "exempt.zip";
// Convert PDf from cloud storage to HTML
var response =await pdfApi.PutPdfInStorageToHtmlAsync(name,resultName);
Console.WriteLine(response);
}
I have tested the scenario with your shared credentials and am unable to notice the timeout issue. It might be a network issue on your end. Please try to test it on another machine/network.
// instantiate the PdfApi
PdfApi pdfApi = new PdfApi(ClientSecret, ClientId);
string name = "exempt.pdf";
string TestDataFolder = "C:\\Users\\hp 840 g3\\Downloads";
string resultName = "exempt.zip";
// upload PDF file to cloud storage
using (var file = System.IO.File.OpenRead(Path.Combine(TestDataFolder, name)))
{
var uploadResponse = pdfApi.UploadFileAsync(name, file);
Console.WriteLine("uploaded...");
}
// Convert PDf from cloud storage to HTML
var response =await pdfApi.PutPdfInStorageToHtmlAsync(name,resultName);
Console.WriteLine(response);
There is no daily limit on requests on either the free or paid plans. However, if required, you can set a daily limit in your Application from aspose.cloud dashboard.
I am afraid I did not get your point. Can you please share some details?
Actually when I try from my system, it got stunted. so don’t know what is the reason behind it. Even when i try it from demo page of aspose it is also failed from there. Regarding the network so I have 100 MB internet.
I have tested the conversion with your credentials and storage without any issue. You may try the conversion on another computer or network and share the results. You may also try the conversion using Aspose default storage and check the outcome; for this purpose, you need to pass the storage name in the API call.