You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Steve Churchill <sc...@shutterfly.com> on 2015/12/08 21:27:47 UTC
PDDocument.load() -- boolean force argument is missing in 2.0.0 (also
missing from
Hi PDFBox-ers,
I’m maintaining a PDFBox app and I noticed that the boolean force argument has been removed:
1.0
public static org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream, boolean) throws java.io.IOException
2.0
public static org.apache.pdfbox.pdmodel.PDDocument load(java.io.File, java.lang.String, boolean) throws java.io.IOException;
Where
force - When true, the parser will skip corrupt pdf objects and will continue parsing at the next object in the file
I notice that the argument is missing from PDFParser too (eventually invoked by load()). Does anyone know what is the behavior now? Is it equivalent to force==true or force==false?
Thanks,
~ Steve
Re: PDDocument.load() -- boolean force argument is missing in 2.0.0 (also missing from
Posted by John Hewson <jo...@jahewson.com>.
> On 8 Dec 2015, at 12:27, Steve Churchill <sc...@shutterfly.com> wrote:
>
>
> Hi PDFBox-ers,
>
> I’m maintaining a PDFBox app and I noticed that the boolean force argument has been removed:
>
> 1.0
> public static org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream, boolean) throws java.io.IOException
> 2.0
> public static org.apache.pdfbox.pdmodel.PDDocument load(java.io.File, java.lang.String, boolean) throws java.io.IOException;
>
> Where
> force - When true, the parser will skip corrupt pdf objects and will continue parsing at the next object in the file
>
> I notice that the argument is missing from PDFParser too (eventually invoked by load()). Does anyone know what is the behavior now? Is it equivalent to force==true or force==false?
The answer is roughly, “neither”. Force was only ever used for parsing problematic strings but we now parse these in a different manner. We’re able to skip over the bad content and keep going.
— John
> Thanks,
>
> ~ Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org