Suhaas
wrote on 2011-11-11:
Hi,
I am getting the following error when I try to run the Java code:
java.net.ConnectException: Connection timed out: connect
Regards
Suhaas
PS:
import com.pdfcrowd.*;
import java.io.*;
public class PdfcrowdTest {
public static void main(String[] args) {
try
{
FileOutputStream fileStream;
// create an API client instance
Client client = new Client("X", "Y");
// convert a web page and save the PDF to a file
fileStream = new FileOutputStream("google_com.pdf");
client.convertURI("http://www.google.com/", fileStream);
fileStream.close();
}
catch(PdfcrowdError why) {
System.err.println(why.getMessage());
}
catch(IOException exc) {
// handle the exception
}
}
}
support
wrote on 2011-11-11:
The reason is likely one of:
1/ You are behind a firewall that blocks requests to pdfcrowd.com
2/ Your internet access is down.