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?
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?
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.
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.
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.
Craig White 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.
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'
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?
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?