pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard (Jira)" <j...@apache.org>
Subject [jira] [Created] (PDFBOX-4700) Error: java.net.ConnectException: Operation timed out (Connection timed out)
Date Fri, 29 Nov 2019 04:04:00 GMT
Richard created PDFBOX-4700:

             Summary: Error: java.net.ConnectException: Operation timed out (Connection timed
                 Key: PDFBOX-4700
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4700
             Project: PDFBox
          Issue Type: Bug
            Reporter: Richard

This is the Java Class:


package com.pdfTrial;

import java.io.BufferedInputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.io.InputStream;

import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.text.PDFTextStripper;

public class pdfBoxRead {

 public String readPDF() throws MalformedURLException{
 String pdfContent="";

 URL url = new URL("[http://www.africau.edu/images/default/sample.pdf]");
 InputStream is = url.openStream();

 BufferedInputStream fileParse = new BufferedInputStream(is);
 PDDocument document = null;
 document = PDDocument.load(fileParse);
 pdfContent = new PDFTextStripper().getText(document);


 catch(Exception e){
 System.out.println("Error" + e);

 return pdfContent;



*Expected Result*:

Return the string value of PDF


*Actual Result*:

java.net.ConnectException: Operation timed out (Connection timed out)

This message was sent by Atlassian Jira

To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org

View raw message