[ 
https://issues.apache.org/jira/browse/PDFBOX-3581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15677133#comment-15677133
 ] 

Dmitri Russu commented on PDFBOX-3581:
--------------------------------------

no Exception, and it is stopping working when arrive on PDFTextStripper 
pDFTextStripper = new PDFTextStripper();

 private void scanFolderFiles(File scanDirectory) {
        File[] filesScan = scanDirectory.listFiles();

        if ( filesScan.length > 0 ) {
            int iterator=0;
            for (final File fileEntry : filesScan) {

           
                if (fileEntry.isDirectory()) {
                    scanFolderFiles(fileEntry);
                } else {
                    try {
                       new PDFExtractThread(fileEntry).start();
                    }
                    catch (Exception e) {
                        e.printStackTrace();
                    }
                }

                iterator++;
            }
        }
    }




//////////////////// Method used for text extracting

  public void pdfBoxExtractText() throws Exception {
        //Retrieving text from PDF document
        PDFTextStripper pdfStripper = new PDFTextStripper();
        System.out.println(this.fileName);
        FileWriter fileWriter = new FileWriter(this.fileName+".txt");
        BufferedWriter writer = new BufferedWriter(fileWriter);
        String text = pdfStripper.getText(this.document);

        System.out.println(text);

        writer.write(text);
        writer.close();
    }




> PDFTextStripper not working on multyple thread
> ----------------------------------------------
>
>                 Key: PDFBOX-3581
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3581
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing, Text extraction
>    Affects Versions: 2.0.3
>         Environment: Ubuntu 15.1
>            Reporter: Dmitri Russu
>
> Hi, I try to use pdfbox to extract text from a list of files, the problem is 
> PDFTextStripper does not work on thread mode, when I try to use it in 
> multythread nothing happens. it is a bug or limitation? 
> could you help me ?
>  thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to