We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

PDF to HTML Conversion with SVG image in C#

Hi Tilal Ahmad,
Thanks for your help. It is working with me now but I am facing a new issue. Currently when I convert the pdf to html with online demo url of aspose, its output is plain html with html table but when i convert it through code then it is generating html with SVG which is of no use for me because I want to scrape the information from the pdf file. I have attached both files, please have a look.
exempt.zip (77.6 KB)

WithOnlinDemo.zip (21.9 KB)


You need to set partsEmbeddingMode and rasterImagesSavingMode properties as follow. It will help you get the required result.

// 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);
// Convert PDf from cloud storage to HTML
var response =await pdfApi.PutPdfInStorageToHtmlAsync(name: name, outPath: resultName, partsEmbeddingMode: "EmbedAllIntoHtml", rasterImagesSavingMode: "AsEmbeddedPartsOfPngPageBackground");

It was better than previous but not exactly the same as i received from the demo url of aspose. The demo url is using the html table wth no absolute position however with code it generates div with absolute position and the order of div does not match with the text in pdf.
exempt.zip (70.7 KB)


Please share the Aspose app URL. It will help us to investigate and address your issue.

Here is the demo url.


Thanks, we are looking into it and will share our findings with you soon.

Any update regarding the issue? Also can you let me know is there any file size limit or the number of pages to be converted limit on free account?


We have logged a ticket(PDFCLOUD-3677) to check the output difference between the Aspose.PDF app and the Aspose.PDF Cloud API. We will share an update with you as soon as the investigation is completed.

No, we don’t have any limitations on the file size of the free account. However, please note that each container(node) has limited memory. Memory consumption depends upon the file structure, as sometimes a 10MB file can take 1GB in memory while processed, and 100MB can take from 100MB to a huge number. You can try the conversion with your big flies; if you face any issues, you can share your input document via some free file sharing service with us for investigation.