Rendering files as image/html

selvamarcadu

Member
Joined
Jul 7, 2009
Messages
17
Programming Experience
Beginner
Hi all,

I have a set of files of various format like pdf,txt,tiff,jpg.I need to render it within the form and highlight the certain keywords.Initially i tried to convert all files to pdf and then render it( using itext for vb.net).Now my colleague advised me to render them as html or images, saying it might make the process easier.

As i basically new to vb.net environment, I will be eager to get your suggestions.



Thanks
Selvam
 
I think youre gonna struggle with this; images are not text. You cannot highlight words in an image without performing OCR on it, then searching it, then working out the coordinate of the word, then drawing a highlight over it..

I've been programming more than 10 years and I wouldnt attempt this; your colleague is talking through his hat too. Rendering any text as image will not make it easier to search and highlight.

As you're a newbie and seem to think this will be a trivial problem there is a good chance you haven't explained it very well.. Do feel free to add more detail
 
Rendering files as images

Hi,Thanks for your response.
Let me explain my requirement in detail.

We want to index certain files ,we are using solr tika,which can index many file formats(doc,pdf,jpg...).

When the user searches for a keyword from vb.net application,we need to render the original file in vb.net with the search keywords highlighted.

We can make the solr-tika to return the path to the file stored in local the system.Then i need to show the file in the .net form.So initially i tried to convert all the files to PDF and store it locally.When the solr returns a path to file ,we showed the pdf file(taken from local file system) using adobe reader com object.But it does not give highlighting feature.Also ,the dependency for adobe reader and cost for acrobat(Full acrobat will give highlighting feature) makes me to think twice.

Hence i need a way to render various format files with highlighting(if feasible for that format,otherwise can be neglected).

Hope i explained it properly.I think ,its a difficult task,but not impossible.
I should be happy to get help from senior programmers.


Note:Basically ,i want to preserve the original file format,when rendering to the user,whereas solr-tika seems to extract only the contents not the formatting.Hence we decided to store it in local file system and render it.Otherwise we could easily render the textual component returned from solr-tika in the .net Form.

Thanks
Selvam
 
Rendering files as images

Hi,

What i need to achieve is,to render various files (pdf,doc,txt,jpg) in the form(as image?), and it should not have any dependency for external library(for eg. Acrobat Reader ).Please let me know, if it is possible.


Thanks
Selvam
 
Back
Top