I have a document with tables in it. I want to convert the each cell present in the table to image. Any suggestions....... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 11 October 2012 10:57, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have a document with tables in it. I want to convert the each cell > present in the table to image.I, for one, have little idea exactly what you mean by this. What sort of document? What do you mean by convert each cell to an image? Which part of the problem do you not know how to do (read the document, find the table, find the cell, generate the image, something else)? What has this got to do with Ruby on Rails? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law wrote in post #1079401:> On 11 October 2012 10:57, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> I have a document with tables in it. I want to convert the each cell >> present in the table to image. > > I, for one, have little idea exactly what you mean by this. What sort > of document? What do you mean by convert each cell to an image? > Which part of the problem do you not know how to do (read the > document, find the table, find the cell, generate the image, something > else)? > > What has this got to do with Ruby on Rails? > > ColinI just have to upload the ms-word document file and click the upload button which should give me the images of the each cell in the table. how to find the cell and convert to image? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 11 October 2012 11:08, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1079401: >> On 11 October 2012 10:57, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> I have a document with tables in it. I want to convert the each cell >>> present in the table to image. >> >> I, for one, have little idea exactly what you mean by this. What sort >> of document? What do you mean by convert each cell to an image? >> Which part of the problem do you not know how to do (read the >> document, find the table, find the cell, generate the image, something >> else)? >> >> What has this got to do with Ruby on Rails? >> >> Colin > I just have to upload the ms-word document file and click the upload > button which should give me the images of the each cell in the table. > > how to find the cell and convert to image?I assume you know how to upload the file (google for rails upload file if not) Then your next problem is not how to find the cell but is how to read the ms word doc in ruby. I don''t know, I suggest some googling for that too. I think it will also depend on what type of ms word doc file it is, .doc, docx etc. You still have not explained what you mean by convert the cell to an image but I think the other problems are more critical. Colin Colin> > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law wrote in post #1079405:> On 11 October 2012 11:08, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> >>> What has this got to do with Ruby on Rails? >>> >>> Colin >> I just have to upload the ms-word document file and click the upload >> button which should give me the images of the each cell in the table. >> >> how to find the cell and convert to image? > > I assume you know how to upload the file (google for rails upload file > if not) > Then your next problem is not how to find the cell but is how to read > the ms word doc in ruby. I don''t know, I suggest some googling for > that too. I think it will also depend on what type of ms word doc > file it is, .doc, docx etc. > > You still have not explained what you mean by convert the cell to an > image but I think the other problems are more critical. > > ColinI have tables in ms-word document(of format doc). I want to convert the data present in each cell either it may be text or image to the image How do you suggest I do it? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 11 October 2012 11:24, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1079405: >> On 11 October 2012 11:08, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>>> >>>> What has this got to do with Ruby on Rails? >>>> >>>> Colin >>> I just have to upload the ms-word document file and click the upload >>> button which should give me the images of the each cell in the table. >>> >>> how to find the cell and convert to image? >> >> I assume you know how to upload the file (google for rails upload file >> if not) >> Then your next problem is not how to find the cell but is how to read >> the ms word doc in ruby. I don''t know, I suggest some googling for >> that too. I think it will also depend on what type of ms word doc >> file it is, .doc, docx etc. >> >> You still have not explained what you mean by convert the cell to an >> image but I think the other problems are more critical. >> >> Colin > I have tables in ms-word document(of format doc). > I want to convert the data present in each cell either it may be text or > image to the image > How do you suggest I do it?As I said the first problem will to find a way of reading the .doc file in ruby, which I don''t know how to do. Did google help you with this? Is suggest googling for ruby read .doc Colin> > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law wrote in post #1079407:> On 11 October 2012 11:24, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> >>> Colin >> I have tables in ms-word document(of format doc). >> I want to convert the data present in each cell either it may be text or >> image to the image >> How do you suggest I do it? > > As I said the first problem will to find a way of reading the .doc > file in ruby, which I don''t know how to do. Did google help you with > this? Is suggest googling for > ruby read .doc > > ColinI can read doc using the docx gem, my problem is identifying the cell and converting it to image -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 11 October 2012 11:40, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1079407: >> On 11 October 2012 11:24, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>>> >>>> Colin >>> I have tables in ms-word document(of format doc). >>> I want to convert the data present in each cell either it may be text or >>> image to the image >>> How do you suggest I do it? >> >> As I said the first problem will to find a way of reading the .doc >> file in ruby, which I don''t know how to do. Did google help you with >> this? Is suggest googling for >> ruby read .doc >> >> Colin > > I can read doc using the docx gem, my problem is identifying the cell > and converting it to imageWell if you had started this thread by asking how to use the docx gem to find a cell in a ms word document then you would have saved us both some time. I have not used the docx gem so have no idea. Does the documentation for the gem tell you how to parse the document? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law wrote in post #1079413:> On 11 October 2012 11:40, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> file in ruby, which I don''t know how to do. Did google help you with >>> this? Is suggest googling for >>> ruby read .doc >>> >>> Colin >> >> I can read doc using the docx gem, my problem is identifying the cell >> and converting it to image > > Well if you had started this thread by asking how to use the docx gem > to find a cell in a ms word document then you would have saved us both > some time. I have not used the docx gem so have no idea. Does the > documentation for the gem tell you how to parse the document? > > ColinParser object source code: def initialize(path) @zip = Zip::ZipFile.open(path) @xml=Nokogiri::XML(@zip.find_entry(''word/document.xml'').get_input_stream) if block_given? yield self @zip.close end end -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 11 October 2012 12:31, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1079413: >> On 11 October 2012 11:40, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>>> file in ruby, which I don''t know how to do. Did google help you with >>>> this? Is suggest googling for >>>> ruby read .doc >>>> >>>> Colin >>> >>> I can read doc using the docx gem, my problem is identifying the cell >>> and converting it to image >> >> Well if you had started this thread by asking how to use the docx gem >> to find a cell in a ms word document then you would have saved us both >> some time. I have not used the docx gem so have no idea. Does the >> documentation for the gem tell you how to parse the document? >> >> Colin > > Parser object source code: > > def initialize(path) > @zip = Zip::ZipFile.open(path) > @xml=Nokogiri::XML(@zip.find_entry(''word/document.xml'').get_input_stream) > > if block_given? > yield self > @zip.close > end > endI don''t understand why you have posted that code. I notice however that the docx gem says that it is for .docx files, not for .doc Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law wrote in post #1079421:> On 11 October 2012 12:31, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> >> @zip = Zip::ZipFile.open(path) >> @xml=Nokogiri::XML(@zip.find_entry(''word/document.xml'').get_input_stream) >> >> if block_given? >> yield self >> @zip.close >> end >> end > > I don''t understand why you have posted that code. I notice however > that the docx gem says that it is for .docx files, not for .doc > > ColinSuggest something other than the googling for finding the table/cell in the document -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law
2012-Oct-11 11:50 UTC
Re: Re: Re: Re: Re: Re: convert the cells in table to images
On 11 October 2012 12:46, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1079421: >> On 11 October 2012 12:31, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>>> >>> @zip = Zip::ZipFile.open(path) >>> @xml=Nokogiri::XML(@zip.find_entry(''word/document.xml'').get_input_stream) >>> >>> if block_given? >>> yield self >>> @zip.close >>> end >>> end >> >> I don''t understand why you have posted that code. I notice however >> that the docx gem says that it is for .docx files, not for .doc >> >> Colin > > Suggest something other than the googling for finding the table/cell in > the documentAs I said I have no idea about that gem. I would start by looking at the documentation for the gem. Colin> > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.