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

Free Support Forum - aspose.com

Convert HTM to TIF Format Problems

I'm new to Aspose and have trying to see if Aspose.Words could be an option to convert HTM files to TIF format. I'm told we have an full Aspose.Total license with support. The Aspose.Words.dll file version I have is 9.8.0.

I'm finding that an HTM file with two columns is converted without Font/Size/Bold/Colors and made into a single column of data. HTM input and TIF output files are attached to this post in zip file. I have noticed that opening the HTM file in Word looks the same as my TIF output and maybe that's all I can get from Aspose.

By looking over the forums, it seems that there are many ways to manipulate information by inserting bits and pieces to try and get a converted HTML file to look a certain way.

Is there no simple way with Aspose.Words to get a WYSIWYG representation of an HTML file?

I am trying something simple in .NET 3.5/VS2012 like the following:

LoadOptions options = new LoadOptions();
options.LoadFormat = LoadFormat.Html;
Document doc = new Document(SourceFile, options);
ImageSaveOptions opt = new ImageSaveOptions(SaveFormat.Tiff);
opt.Resolution = DPI;
opt.TiffCompression = TiffCompression.Ccitt4;
doc.Save(OutputFile, opt);

Hi Bruce,

Thanks for your inquiry.

BruceD:

I’m finding that an HTM file with two columns is converted without Font/Size/Bold/Colors and made into a single column of data. HTM input and TIF output files are attached to this post in zip file. I have noticed that opening the HTM file in Word looks the same as my TIF output and maybe that’s all I can get from Aspose.

Please note that Aspose.Words mimics the same behavior as MS Word. If you load the same HTML into MS Word, you will get the same output. Regarding font issue, please use the latest version of Aspose.Words for .NET 14.8.0. This will fix the font issue.
BruceD:

Is there no simple way with Aspose.Words to get a WYSIWYG representation of an HTML file?

Upon
processing HTML, some features of HTML might be lost. You can find a
list of limitations upon HTML exporting/importing here:
http://www.aspose.com/docs/display/wordsnet/Load+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format
http://www.aspose.com/docs/display/wordsnet/Save+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format

Hope this answers your query. Please let us know if you have any more queries.