RE: https external-graphics

Neil Smeby <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <SN6PR1901MB22229F6DE85B40BD53AC36F4F28A0@SN6PR1901MB2222.namprd19.prod.outlook.com>
(sorry to break the thread chain, I just recently joined the list and missed
the original responses)

So the example image I was trying to use in FOP was a random google image
search result (for foo) that was on a BBC media server that had https with a
valid signed (not self-signed) certificate. And when I try to fetch the image
using the simple java program below, it works fine. So it doesn't seem to be
a JDK or certificate problem. Can someone else test the .fo file in my original
email? Feel free to replace the image url with an https reference you trust.

import java.net.*;
import java.io.*;

public class foo {
    public static void main(String[] args) throws Exception {
        URL url = new URL("https://ichef.bbci.co.uk/images/ic/960x540/p01br4cp.jpg");
        URLConnection connection = url.openConnection();
        InputStream is = connection.getInputStream();

        BufferedReader in = new BufferedReader(new InputStreamReader(is));

        StringBuilder response = new StringBuilder();
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            response.append(inputLine);

        in.close();

        System.out.println(response.toString());
    }
}


Neil Smeby | Software Engineer
Direct: 763-795-4160
Mobile: 763-218-6259
www.infinitecampus.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.