pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stahle, Patrick" <patrick.sta...@te.com>
Subject PDPageContentStream Deprecated in latest 2.0 Snapshot?
Date Fri, 26 Feb 2016 13:20:34 GMT
Hi Tillman,

Just noticed that most of constructors for new PDPageContentStream are showing as deprecated
in the latest 2.0 snapshot? Are these going away and if so what is the replacement? 

Also it is showing that CCITTFactory.createFromRandomAccess is deprecated....

This also leads to a more general question for when is the approximate plan for 2.0 to be
released? Also when is it expected that the the 2.0 api is stable?

Thanks,
Patrick


-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@t-online.de] 
Sent: Thursday, February 25, 2016 1:11 PM
To: users@pdfbox.apache.org
Subject: Re: PDAnnotationMarkup.getInReplyTo

done
https://issues.apache.org/jira/browse/PDFBOX-3249

Tilman

Am 24.02.2016 um 23:45 schrieb Tilman Hausherr:
> Am 24.02.2016 um 23:38 schrieb David Lattimore:
>> On Wed, Feb 24, 2016 at 6:39 PM, Tilman 
>> Hausherr<THausherr@t-online.de>
>> wrote:
>>
>>> >Am 24.02.2016 um 06:21 schrieb David Lattimore:
>>> >
>>>> >>I'm trying to read annotations from PDFs and am having trouble
>>>> matching up
>>>> >>replies with the annotations they're in reply to.
>>>> >>
>>>> >>PDPage.getAnnotations() returns a list of PDAnnotation. When I 
>>>> >>have a PDAnnotationMarkup, I try to call getInReplyTo to get the

>>>> >>previous annotation in the thread. But I have two problems:
>>>> >>
>>>> >>1) getInReplyTo() crashes if the annotation isn't a reply. It'd
>>>> be nice if
>>>> >>it just returned null. I can work around this by getting the
>>>> COSDictionary
>>>> >>and checking for an IRT entry first.
>>>> >>
>>> >
>>> >Please post a stack trace
>> java.io.IOException: Error: Unknown annotation type null at
>> org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.createA
>> nnotation(PDAnnotation.java:167)
>>
>> at
>> org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup.g
>> etInReplyTo(PDAnnotationMarkup.java:225)
>>
>>
>> The following code can be used to reproduce this:
>> new PDAnnotationMarkup().getInReplyTo();
>>
>
> So it is an IOException, this isn't as bad as a nullpointerexception. 
> But it is kindof weird indeed, usually we just return null when 
> something doesn't exist. (I know that this is bad design 
> http://www.yegor256.com/2014/05/13/why-null-is-bad.html but it's too 
> late now). I'll sleep over it and then probably change it.
>
> Tilman
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


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

Mime
View raw message