Here's my code I have searched to archive for a similar instance but
didn't find any. I can access the image if I drop the URL in the browser
address field.

 

/*

 * This fails in com.lowagie.text.Image.getInstance with "java.awt.Image
fetch aborted or errored" 

 * during run of app but works if used in the browser

 */ 

java.awt.Image awtImage =
Toolkit.getDefaultToolkit().createImage("http://localhost:7080/triumph/a
ssets/circleHalo.jpeg");  // iText in Action has this in reverse order
parse first, then getInstance

      // This works no errors

// java.awt.Image awtImage =
Toolkit.getDefaultToolkit().createImage("/TopmostParent/assets/The_Coach
_Logo.png");                          

// For the moment output to a file

PdfWriter.getInstance(document,     new FileOutputStream("rpt3.pdf"));

document.open();

 

// fails here when using a URL doesn't fail if using a hard path to the
file

com.lowagie.text.Image img =
com.lowagie.text.Image.getInstance(awtImage, null);

 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to