Zitat von Robert Spielmann <[EMAIL PROTECTED]>:
[Zitattext verstecken]
> Hi all,
>
> My current project requires me to write a PDF generator that stamps
> a template PDF with additional data, including signatures which are
> to be read from image files. The generator is to be deployed as a
> JAR file, hence I need to load both the PDF template and the
> signature images from the JAR. I know how to read files from a JAR,
> but I'm unable to find out whether Image.getInstance() and the
> PdfReader constructor are able to load files from the JAR. Any hints?
>
Hello Robert,
you could get an URL from all objectes in Jars,
e.g. look at you jar
de.codecentric.package.YourImage.png;
de.codecentric.package.YourClass.class;
and then retrieve in your code:
URL url = YourClass.class.getResource("YourImage.png");
Image.getInstance( url );
Bye, Carsten
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar