pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: PDDocument.load no longer has the force option?
Date Fri, 11 Dec 2015 17:59:30 GMT
Hi Joe,

The force option in 1.8 only did one thing: it skipped invalid characters in strings.
We have better handing for this in 2.0 and so force is no longer necessary.

Perhaps the problem you’re encountering is due to other changes in the parser
in 2.0, if you could post a PDF publicly then we can take a look at it.

— John

> On 11 Dec 2015, at 07:02, Joe Ye <yuanzhou.ye@gmail.com> wrote:
> 
> Hi,
> 
> 
> With the latest version 2.0.0-RC2, I found that the force flag of the below
> method signature (to skip corrupt PDF objects) no longer exists. This broke
> some of our existing usage. Could you advise if there's an alternative way
> to do it (i.e. skip corrupt objects)?
> 
> 
> 
> public static PDDocument
> <http://pdfbox.apache.org/docs/1.8.10/javadocs/org/apache/pdfbox/pdmodel/PDDocument.html>
> load(InputStream
> <http://download.oracle.com/javase/1.5.0/docs/api/java/io/InputStream.html?is-external=true>
> input,
>              boolean force)
>                       throws IOException
> <http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true>
> 
> 
> 
> Many thanks,
> 
> Joe


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


Mime
View raw message