loading images
- From: Bruno Lowagie <bruno (at) lowagie.com>
- Date: Sat, 03 Feb 2007 10:58:02 +0100
Arif Abbasi wrote:
> The problem with the above approach is that we have to package those
> images in our jar file, which is not desirable.
OK, I thought this was your original requirement,
the fact that you are now saying this in not desirable
confused me.
> We want to avoid this
> (exploded is not an option either).
The word 'exploded' also confuses me. What does it mean?
> Since number and type of images can change depending upon reports and
> customers, we want to load images in UI
In UI? Do you mean User Interface?
How do I have to interpret this?
Are you showing the images in an AWT or Swing object?
> and pass to iText code (in jar)
> file as a File object as a parameter – like a file object and then
> create image out of it.
The iText Image object can deal with images in all
kinds of forms, including java.awt.Image and byte[].
> This would have advantage of not jarring the images in the jar file
> (they could reside in their place in webapps)
In their place in webapps is very vague.
I have no idea what you mean by this.
Are we still talking about undesired jars?
> as well as allowing users
> to load different images for different stuff.
How would they do that? With a FileSelector object?
You are not being clear at all.
> I looked at iText api for
> images and there is no method like:
> Image.getInstance (File file).
I don't think your understanding of class java.io.File is correct.
> 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.
I think you are basing your conclusion on wrong assumptions.
> The back-end iText code can either do
>
> Image img = Image.getInstance(File file) and do
>
> Document.add(img)
>
> 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
>
> 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.
>
> Kindly tell me if its possible and if there is a sample?
I agree with Paulo. Your question isn't going anywhere.
You have me all confused; probably because I fail to
what this has to do with iText and because you have
some serious misconceptions about webapps.
br,
Bruno
-------------------------------------------------------------------------
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/
- Follow-Ups:
- loading images
- From: Arif Abbasi <arif.abbasi (at) verizonbusiness.com>
- References:
- loading images
- From: Arif Abbasi <arif.abbasi (at) verizonbusiness.com>