Add image to PDF from a URL?
10,825
This is a known issue when loading .gif from a remote location with iText.
A fix for this would be to download the .gif with Java (not via the getInstance method of iText's Image class) and to use the downloaded bytes in the getInstance method of the Image class.
Edit: I went ahead and fixed remote gif loading in iText, it is included from iText 5.4.1 and later.
Comments
-
riahc3 almost 2 years
Im trying to add a image from a URL address to my pdf. The code is:
Image image=Image.getInstance("http://www.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"); image.scaleToFit((float)200.0, (float)49.0); paragraph.add(image);
But it does not work. What can be wrong?