PDF to HTML - CSS

I need to convert documents from PDF to HTML. Is there a way to do this that produces an HTML file with CSS included in the HTML file, or do I have to read in the CSS and insert it into the HTML file?

Also I seem to be getting some side effects when I convert a file from byte[] to string. For example, sometimes a bulleted list will show all the bullets first, without the accompanying text following below. I’ve attached a small example of this. I was wondering if there were any tips to avoid this. Should I be using UTF8Encoding or something else?

Also is there a way to do this process in memory, or is that still not possible?

Thanks!

Hi Carter,


Thanks for your interest in our products. Can you please share the source PDF document so that we can test the scenario at our end. We apologize for your inconvenience.

Thanks for your quick reply, I’ve actually just now tried to convert the
file again and it seems to be working. I believe adding Encoding.UTF8
when reading and writing text to file may have helped.



I have another question about the process of conversion. When I actually
convert the file to HTML, I get a TON of text written to the console
which I don’t want. Are you familiar with this side effect?



It seems to be happening when I call doc.Save(filename, Aspose.Pdf.SaveFormat.Html)


using (var inputStream = new MemoryStream(inputByteArray))
{
var doc = new Aspose.Pdf.Document(inputStream);

doc.Save(
string.Format(outputPath + “{0}.html”, fileName),
Aspose.Pdf.SaveFormat.Html); (…)

cwolfe7129:
Thanks for your quick reply, I've actually just now tried to convert the file again and it seems to be working. I believe adding Encoding.UTF8 when reading and writing text to file may have helped.

Hi, I am glad to hear that your problem is fixed. If you have any further query, please feel free to contact.

cwolfe7129:
I have another question about the process of conversion. When I actually convert the file to HTML, I get a TON of text written to the console which I don't want. Are you familiar with this side effect?

It seems to be happening when I call doc.Save(filename, Aspose.Pdf.SaveFormat.Html)
I have managed to reproduce the same behaviour and for the sake correction, I have logged it as PDFNEWNET-32053 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for this inconvenience.

The issues you have found earlier (filed as 32053) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.