I am using the aspose pdf kit version 188.8.131.52
I have a requirement where in, clicking on a pdf document, i would have to extract the contents as html and display it in the div.
//getting the uploaded file content as a stream
Stream stream = uploadedFile.InputStream;
PdfExtractor extractor = new PdfExtractor();
extractor.ExtractTextMode = 1;
using (var memoryStream = new MemoryStream())
using (var sr = new StreamReader(memoryStream))
memoryStream.Position = 0;
fileText = sr.ReadToEnd();
All i get in the fileText is just the text content in the PDF, but i would like to see the exact formatted text as it was in the PDF. Searched the forums on this, could not find anything relevant
Please let me know on how to achieve this.
Thanks and regards,
I’m sorry to share with you that currently Aspose.Pdf for .NET doesn’t allow you to convert or extract PDF contents to HTML format. We have already logged a new feature request as PDFNEWNET-13729 in our issue tracking system to provide support for this feature. You’ll be updated via this forum thread once it is supported in future.
We’re sorry for the inconvenience.