I MAY be able to derive something out of the present example given here : http://blog.codeinmotion.com/index.php/2006/12/22/pdf-generation-in-ruby-on-rails/ but this deals with filling out forms. Is there a simpler example that just allows you to talk to itext , send it some plain text and get back a pdf and then send that pdf to the user as downloadable / renderable data? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sat, 2008-07-05 at 14:39 +0200, Ather Shiraz wrote:> I MAY be able to derive something out of the present example given here > : > http://blog.codeinmotion.com/index.php/2006/12/22/pdf-generation-in-ruby-on-rails/ > > but this deals with filling out forms. Is there a simpler example that > just allows you to talk to itext , send it some plain text and get back > a pdf and then send that pdf to the user as downloadable / renderable > data?---- sounds like all you really want is pdf-writer itext is for filling out forms (and by the way, I ended up using a combination of pdf-stamper gem and some more raw methods because rjb/itext was incapable of doing checkboxes). see http://wiki.rubyonrails.org/rails/pages/HowtoGeneratePDFs Craig --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
No I do not want pdfwriter because I already tried it and it is inadequate. It does not have the capabilities I want like putting pushbuttons on the pdf or encrypting them (pdf writer''s encryption is broken and removed) but for starters an example would have been nice. Craig White wrote:> On Sat, 2008-07-05 at 14:39 +0200, Ather Shiraz wrote: >> I MAY be able to derive something out of the present example given here >> : >> http://blog.codeinmotion.com/index.php/2006/12/22/pdf-generation-in-ruby-on-rails/ >> >> but this deals with filling out forms. Is there a simpler example that >> just allows you to talk to itext , send it some plain text and get back >> a pdf and then send that pdf to the user as downloadable / renderable >> data? > ---- > sounds like all you really want is pdf-writer > > itext is for filling out forms (and by the way, I ended up using a > combination of pdf-stamper gem and some more raw methods because > rjb/itext was incapable of doing checkboxes). > > see http://wiki.rubyonrails.org/rails/pages/HowtoGeneratePDFs > > Craig-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
pdf-writer comes with a chunky bacon example if I recall correctly. You could always ''post-process'' a pdf file with pdftk to encrypt it. Don''t know about pushbuttons in pdf''s As far as I know, the rails wiki page on PDF that I linked in the previous e-mail is the exhaustive resource on integrating PDF''s with rails. Craig On Sat, 2008-07-05 at 17:19 +0200, Ather Shiraz wrote:> No I do not want pdfwriter because I already tried it and it is > inadequate. It does not have the capabilities I want like putting > pushbuttons on the pdf or encrypting them (pdf writer''s encryption is > broken and removed) but for starters an example would have been nice. > > Craig White wrote: > > On Sat, 2008-07-05 at 14:39 +0200, Ather Shiraz wrote: > >> I MAY be able to derive something out of the present example given here > >> : > >> http://blog.codeinmotion.com/index.php/2006/12/22/pdf-generation-in-ruby-on-rails/ > >> > >> but this deals with filling out forms. Is there a simpler example that > >> just allows you to talk to itext , send it some plain text and get back > >> a pdf and then send that pdf to the user as downloadable / renderable > >> data? > > ---- > > sounds like all you really want is pdf-writer > > > > itext is for filling out forms (and by the way, I ended up using a > > combination of pdf-stamper gem and some more raw methods because > > rjb/itext was incapable of doing checkboxes). > > > > see http://wiki.rubyonrails.org/rails/pages/HowtoGeneratePDFs > > > > Craig >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Are you following my question ? Or do you like to come up with tangential issues ? I will write up a simple example and put it up myself :) Craig White wrote:> pdf-writer comes with a chunky bacon example if I recall correctly. > > You could always ''post-process'' a pdf file with pdftk to encrypt it. > > Don''t know about pushbuttons in pdf''s > > As far as I know, the rails wiki page on PDF that I linked in the > previous e-mail is the exhaustive resource on integrating PDF''s with > rails. > > Craig-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
require ''rjb'' Rjb::load(''iText-2.1.2u.jar'') filestream = Rjb::import(''java.io.FileOutputStream'') pdf_writer = Rjb::import("com.lowagie.text.pdf.PdfWriter") document = Rjb::import("com.lowagie.text.Document") par = Rjb::import("com.lowagie.text.Paragraph") ps = Rjb::import("com.lowagie.text.PageSize") chunk = Rjb::import("com.lowagie.text.Chunk") font = Rjb::import("com.lowagie.text.Font") #ff = Rjb::import("com.lowagie.text.FontFactory") bf = Rjb::import("com.lowagie.text.pdf.BaseFont") #ff.register("C:\\WINDOWS\\Fonts\\CALIBRIB.TTF", "calibri"); arial bf.createFont( "C:\\WINDOWS\\Fonts\\CALIBRIB.TTF", bf.IDENTITY_H, bf.NOT_EMBEDDED); m = filestream.new("asdasd.pdf") document= document.new() writer= pdf_writer.getInstance(document,m) #writer.closeStream = false document.open() document.add(par.new("Hello World!", font.new(arial))) document.add(par.new("Now I run on Rails!", font.new(arial))) document.add(par.new("Юникод пашет!!!!", font.new(arial))) document.close m.close On Jul 5, 4:39 pm, Ather Shiraz <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I MAY be able to derive something out of the present example given here > :http://blog.codeinmotion.com/index.php/2006/12/22/pdf-generation-in-r... > > but this deals with filling out forms. Is there a simpler example that > just allows you to talk to itext , send it some plain text and get back > a pdf and then send that pdf to the user as downloadable / renderable > data? > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Cool that is what I was looking for ... I have some of it abstracted to a java class; Do I send m to the render method ? miv wrote:> require ''rjb'' > Rjb::load(''iText-2.1.2u.jar'') > #ff.register("C:\\WINDOWS\\Fonts\\CALIBRIB.TTF", "calibri"); > arial > bf.createFont( > "C:\\WINDOWS\\Fonts\\CALIBRIB.TTF", > bf.IDENTITY_H, > bf.NOT_EMBEDDED); > m = filestream.new("asdasd.pdf") > document= document.new() > writer= pdf_writer.getInstance(document,m) > #writer.closeStream = false > document.open() > document.add(par.new("Hello World!", font.new(arial))) > document.close > m.close-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RJB cant seem to be able to load iText-2.1.2u.jar; where is this placed? I tried placing it the c:/ruby/lib folder then in the lib folder and then in the folder where I was running irb ; then in the jdk''s lib and still was unable to locate this jar. it keeps returning nil; and when I call chunk for example it gives me classdefnotfound etc. miv wrote:> require ''rjb'' > Rjb::load(''iText-2.1.2u.jar'') >-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, 2008-07-07 at 04:15 +0200, Ather Shiraz wrote:> RJB cant seem to be able to load iText-2.1.2u.jar; where is this placed? > I tried placing it the c:/ruby/lib folder > then in the lib folder and then in the folder where I was running irb ; > then in the jdk''s lib and still was unable to locate this jar. it keeps > returning nil; > > and when I call chunk for example it gives me classdefnotfound etc. > > > miv wrote: > > require ''rjb'' > > Rjb::load(''iText-2.1.2u.jar'') > >---- I use the pdf-stamper gem and it incorporates itext with the gem (in the ext folder) Craig --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Craig White wrote:> On Mon, 2008-07-07 at 04:15 +0200, Ather Shiraz wrote: >> > require ''rjb'' >> > Rjb::load(''iText-2.1.2u.jar'') >> > > ---- > I use the pdf-stamper gem and it incorporates itext with the gem (in the > ext folder) > > CraigYou expect me to install pdf-stamper even though i am not using pdf stamper? and I should install pdfstamper just so I can get to the itext libraries? I dont think that is a good idea, I dont know what everyone else thinks about this. I tried putting the jars in rjb''s ext folder but that didnt work. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, 2008-07-07 at 04:54 +0200, Ather Shiraz wrote:> Craig White wrote: > > On Mon, 2008-07-07 at 04:15 +0200, Ather Shiraz wrote: > >> > require ''rjb'' > >> > Rjb::load(''iText-2.1.2u.jar'') > >> > > > ---- > > I use the pdf-stamper gem and it incorporates itext with the gem (in the > > ext folder) > > > > Craig > > You expect me to install pdf-stamper even though i am not using pdf > stamper? and I should install pdfstamper just so I can get to the itext > libraries? > I dont think that is a good idea, I dont know what everyone else thinks > about this. > > I tried putting the jars in rjb''s ext folder but that didnt work.---- no - I don''t expect you to do anything. I''m just relating that the pdf-stamper gem automatically brings the itext.jar in with it and it is automatically loaded when you load PDF::Stamper. I suppose you could load the gem just to see how that gem makes use of it but the choice is yours. The gem loads it like this... Rjb::load(File.join(File.dirname(__FILE__), ''..'', ''..'', ''ext'', ''itext-2.0.4.jar'')) Craig --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I placed jar in the same folder as script. I think any folder in PATH will do. Does any other java lib working? may be problem in jvm version? On 7 июл, 06:15, Ather Shiraz <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> RJB cant seem to be able to load iText-2.1.2u.jar; where is this placed? > I tried placing it the c:/ruby/lib folder > then in the lib folder and then in the folder where I was running irb ; > then in the jdk''s lib and still was unable to locate this jar. it keeps > returning nil; > > and when I call chunk for example it gives me classdefnotfound etc. > > miv wrote: > > require ''rjb'' > > Rjb::load(''iText-2.1.2u.jar'') > > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes String is working for example from the irb interface. I have placed the jar file in script but when I type Rjb::load(''iText-2.1.2u.jar'') I get an error saying RuntimeError : unknown error from (irb):2: in ''initialize'' from (irb):2: in ''dlopen'' from (irb):2: in ''load'' miv wrote:> I placed jar in the same folder as script. I think any folder in PATH > will do. Does any other java lib working? may be problem in jvm > version? > > On 7 , 06:15, Ather Shiraz <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Is there a way of sending this pdf file asdasd.pdf to the browser ; Send binary data to the user as a file download as follows : send_data(BINARY_DATA,{:filename=>"asasd.pdf",:type=>"application/pdf"}) send_data at : http://api.rubyonrails.org/classes/ActionController/Streaming.html What is BINARY_DATA below? is it document, m, pwf_writer? BTW I am still unable to load this jar file using rjb ... you are welcome to see here : http://rubyforge.org/forum/forum.php?thread_id=26875&forum_id=8190 miv wrote:> require ''rjb'' > Rjb::load(''iText-2.1.2u.jar'') > filestream = Rjb::import(''java.io.FileOutputStream'') > pdf_writer = Rjb::import("com.lowagie.text.pdf.PdfWriter")> > document = Rjb::import("com.lowagie.text.Document") > m = filestream.new("asdasd.pdf") > document= document.new() > writer= pdf_writer.getInstance(document,m) > document.open() > document.add(par.new("Hello World!", font.new(arial))) > document.add(par.new("Now I run on Rails!", font.new(arial))) > document.close > m.close-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am still attempting to figure out how to send an Itext generated pdf Document to the browser. I am looking at the following blog posting where someone is using jruby and iText to create a pdf file and then sending it to the browser : http://codersifu.blogspot.com/2007/06/howto-generate-pdf-files-in-ruby-on.html Unlike the above example I am using only ruby / on rails. I would like to do precisely this in ROR and I can get to the second last line of the above blog (that is I can generate the document and even the toByteArray or byte[] ). As in the example: document.close // <<<--- I can get this document send_data String.from_java_bytes(m.toByteArray), :type=> "application/pdf", :dispostion=>"inline" // I can call the toByteArray and get the array of bytes byte[] but I dont know how to send_data to the browser with the document and byetarraystream available. I try to do a byte[].toString() and send that to send_data but when I get byte[].toString() from the java classes I get an error : No Class DefFoundError (org/bouncycastle/asn1/ASN1OctetString) Where to go from here? From the blog : Is there an equivalent to String.from_java_bytes in ruby? Ather Shiraz wrote:> Is there a way of sending this pdf file asdasd.pdf to the browser ; Send > binary data to the user as a file download as follows : > > send_data(BINARY_DATA,{:filename=>"asasd.pdf",:type=>"application/pdf"}) > > send_data at : > http://api.rubyonrails.org/classes/ActionController/Streaming.html > > What is BINARY_DATA below? is it document, m, pwf_writer? > > BTW I am still unable to load this jar file using rjb ... you are > welcome to see here : > http://rubyforge.org/forum/forum.php?thread_id=26875&forum_id=8190 > > miv wrote: >> require ''rjb'' >> Rjb::load(''iText-2.1.2u.jar'') >> filestream = Rjb::import(''java.io.FileOutputStream'') >> pdf_writer = Rjb::import("com.lowagie.text.pdf.PdfWriter")> >> document = Rjb::import("com.lowagie.text.Document") >> m = filestream.new("asdasd.pdf") >> document= document.new() >> writer= pdf_writer.getInstance(document,m) >> document.open() >> document.add(par.new("Hello World!", font.new(arial))) >> document.add(par.new("Now I run on Rails!", font.new(arial))) >> document.close >> m.close-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, 2008-07-14 at 03:14 +0200, Ather Shiraz wrote:> I am still attempting to figure out how to send an Itext generated pdf > Document to the browser. > > I am looking at the following blog posting where someone is using jruby > and iText to create a pdf file and then sending it to the browser : > http://codersifu.blogspot.com/2007/06/howto-generate-pdf-files-in-ruby-on.html > > Unlike the above example I am using only ruby / on rails. > > I would like to do precisely this in ROR and I can get to the second > last line of the above blog (that is I can generate the document and > even the toByteArray or byte[] ). As in the example: > > document.close // <<<--- I can get this document > send_data String.from_java_bytes(m.toByteArray), > :type=> "application/pdf", :dispostion=>"inline" > // I can call the toByteArray and get the array of bytes byte[] > > but I dont know how to send_data to the browser with the document and > byetarraystream available. > > I try to do a byte[].toString() and send that to send_data but when I > get byte[].toString() from the java classes I get an error : > > No Class DefFoundError (org/bouncycastle/asn1/ASN1OctetString) > > Where to go from here? > > From the blog : Is there an equivalent to String.from_java_bytes in > ruby?---- I can''t help here except that I save the PDF to a file and then use send_file and it''s all fairly simple. Craig --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Craig White wrote:> On Mon, 2008-07-14 at 03:14 +0200, Ather Shiraz wrote: >> last line of the above blog (that is I can generate the document and >> I try to do a byte[].toString() and send that to send_data but when I >> get byte[].toString() from the java classes I get an error : >> >> No Class DefFoundError (org/bouncycastle/asn1/ASN1OctetString) >> >> Where to go from here? >> >> From the blog : Is there an equivalent to String.from_java_bytes in >> ruby? > ---- > I can''t help here except that I save the PDF to a file and then use > send_file and it''s all fairly simple. > > CraigOK!! that works ... I am at a point where this maybe inefficient but I will take it! Thanks ! -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You can use send_data by passing it a bytearray!!!!! no need for String.fromjavabytes.... Craig White wrote:> On Mon, 2008-07-14 at 03:14 +0200, Ather Shiraz wrote: >> last line of the above blog (that is I can generate the document and >> I try to do a byte[].toString() and send that to send_data but when I >> get byte[].toString() from the java classes I get an error : >> >> No Class DefFoundError (org/bouncycastle/asn1/ASN1OctetString) >> >> Where to go from here? >> >> From the blog : Is there an equivalent to String.from_java_bytes in >> ruby? > ---- > I can''t help here except that I save the PDF to a file and then use > send_file and it''s all fairly simple. > > Craig-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ok following is a posting on blogger about using itext using ROR: http://techpanacea.blogspot.com/2008/07/itext-with-ruby-on-rails-using-ruby.html Is there a better blogging site. I cannot format the code properly on this one? How do I format it nicer? Ather Shiraz wrote:> You can use send_data by passing it a bytearray!!!!! no need for > String.fromjavabytes....-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---