LEADTOOLS Support
Imaging
Imaging SDK Questions
Converting from HTML and MS-Office formats to TIFF
#1
Posted
:
Sunday, June 14, 2015 8:23:55 PM(UTC)
Groups: Registered
Posts: 2
I have tried to find examples of how to do this in the forums and there seem to be conflicting examples.
Can you point me to example code preferably VB.Net, but C# is okay, that shows how to process a HTML document with various extras such as jpeg images in-bedded such as you get in an email and convert that in to a tiff image.
I will also need to be able to convert word and excel format documents. I can see that there used to be a converter reader, but the comment against it is that it is now depreciated. What is the best way of processing these types of documents?
I am currently working with an evaluation version of V19.
#2
Posted
:
Monday, June 15, 2015 12:34:23 AM(UTC)
Groups: Registered, Tech Support
Posts: 26
In order to convert an HTML file or an MS Office file to a TIFF, simply load it as a raster image and then save it as a TIFF. This can be done using these lines of code:
++++++++
Dim inputFile As String = "Input file name"
Dim outputFile As String = "Output file name"
Dim desiredBPP As Integer = 24
Dim _codecs As New RasterCodecs
Dim _image As RasterImage = _codecs.Load(inputFile)
_codecs.Save(_image, outputFile, RasterImageFormat.Tif, desiredBPP)
++++++++
Make sure to reference all the required DLLs to be able to load the HTML files and the MS Office files and also be able to save TIFF files. Refer to "Files to be included in your application" help topic to know which DLLs to reference:
https://www.leadtools.com/help/leadtools/v19/dh/to/leadtools.topics~leadtools.topics.filestobeincludedwithyourapplication.html
Faris Shahin
Developer Support Engineer
LEAD Technologies, Inc.
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
LEADTOOLS Support
Imaging
Imaging SDK Questions
Converting from HTML and MS-Office formats to TIFF
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.