You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Olivier Cailloux (JIRA)" <ji...@apache.org> on 2017/12/25 21:08:00 UTC

[jira] [Updated] (PDFBOX-4046) Interrupt does not interrupt loading of a PDF

     [ https://issues.apache.org/jira/browse/PDFBOX-4046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Cailloux updated PDFBOX-4046:
-------------------------------------
    Description: 
PDDocument.load can take quite some time. It would be nice to be able to interrupt the thread if desired. 

It is also natural to expect that the method PDDocument.load will cease treatment if the thread gets interrupted, similar to e.g. reading a file using a method from the JDK. 

This [test class|https://github.com/oliviercailloux/PDF-p/blob/pdf-load-non-interruptible/src/test/java/io/github/oliviercailloux/pdf_number_pages/InterruptPdfLoadTest.java] illustrates the problem (the test is green, the problem is only exhibited in the log). The companion class {{InterruptReadTest.java}} shows the expected interruption behavior, by contrast, using a normal file read from the JDK.


  was:
PDDocument.load can take quite some time. It would be nice to be able to interrupt the thread if desired. 

It is also natural to expect that the method PDDocument.load will cease treatment if the thread gets interrupted, similar to e.g. reading a file using a method from the JDK. 

This [{{test class}}|https://github.com/oliviercailloux/PDF-p/blob/pdf-load-non-interruptible/src/test/java/io/github/oliviercailloux/pdf_number_pages/InterruptPdfLoadTest.java] illustrates the problem (the test is green, the problem is only exhibited in the log). The companion class {{InterruptReadTest.java}} shows the expected interruption behavior, by contrast, using a normal file read from the JDK.



> Interrupt does not interrupt loading of a PDF
> ---------------------------------------------
>
>                 Key: PDFBOX-4046
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4046
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.8
>            Reporter: Olivier Cailloux
>            Priority: Minor
>
> PDDocument.load can take quite some time. It would be nice to be able to interrupt the thread if desired. 
> It is also natural to expect that the method PDDocument.load will cease treatment if the thread gets interrupted, similar to e.g. reading a file using a method from the JDK. 
> This [test class|https://github.com/oliviercailloux/PDF-p/blob/pdf-load-non-interruptible/src/test/java/io/github/oliviercailloux/pdf_number_pages/InterruptPdfLoadTest.java] illustrates the problem (the test is green, the problem is only exhibited in the log). The companion class {{InterruptReadTest.java}} shows the expected interruption behavior, by contrast, using a normal file read from the JDK.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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