By Date: <-- -->
By Thread: <-- -->

loading images



The problem as I described in my code (in e-mail below that you missed,
since it got bounced back) was the jarring of the images. We want to avoid
that

Image.getInstance (String filename) does not work on images in jar file, I
have to use Image.getInstance(URL url)along with class loader. All this
required images to be packaged in jar file. We want to avoid this (exploded
is not an option either). Our webapp packaged in separate war has to access
the iText pdf report generation code (that also puts images on the document)
that is in jar file.

Since number and type of images can change depending upon reports and
customers, we want to load images in UI and pass to iText code (in jar) file
as a File object. This way the images don't have to be jarred up.

A method like Image.getInstance (File fileObject) could prevent all the
above, since UI will load image as file and pass to back-end code the file.
The back-end iText code can either can then do

Image img = Image.getInstance(File file) and do
Document.add(img)

This is what we want.

Thanks
arif

-----Original Message-----
From: itext-questions-bounces (at) lists.sourceforge.net
[mailto:itext-questions-bounces (at) lists.sourceforge.net] On Behalf Of Brian
McKeever
Sent: Friday, February 02, 2007 12:57 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] loading images

> We want to load the images as file from UI and pass to back-end as file
> object and then want to use something like
> Image.getInstance (File file) to create images.

[...]

> There is Image.getInstance(String filename) and Image.getInstance(URL url)
> in API, but they would require class loader to load the images as well as
> packaging them in the jar file

What's wrong with the getInstance that takes a string?  Can't you just use
Image.getInstance(file.getAbsolutePath()); ?

Brian

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/