You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Andrea Vacondio <an...@gmail.com> on 2015/02/07 15:40:17 UTC

Outline parent with P key

Hi,
I'm trying to become more familiar with PDFBox code and I have a simple use
case involving document outline. I decided to start looking at the fairly
simple outline package, review it, clean the code a bit keeping an eye on
Sonar and write unit tests for that.
I was writing unit test for the PDOutlineNode.getParent which gets the
parent node looking for a PARENT or a P key in the outline item dictionary.
Now according to table 153 of the specs only PARENT should be there so I
was wandering if someone knows better why the P is there and if it should
be covered by the unit.

BTW is it fine if I submit unit tests?

Re: Outline parent with P key

Posted by Brzrk One <br...@gmail.com>.
Unless of course the P represents common practice, regardless of the spec...

On Sun, Feb 8, 2015 at 4:49 AM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Indeed, the P isn't mentioned in the spec. This has been there since 2008,
> and we don't have the prior history. Probably somebody copied code from
> elsewhere. I'll remove it.
> (I think I saw both elsewhere in a PDF, probably annotations)
>
> Re: unit tests, better start small, to see that you don't do work that
> isn't used, and that you get a feeling about what is accepted.
>
> Tilman
>
> Am 07.02.2015 um 15:40 schrieb Andrea Vacondio:
>
>  Hi,
>> I'm trying to become more familiar with PDFBox code and I have a simple
>> use
>> case involving document outline. I decided to start looking at the fairly
>> simple outline package, review it, clean the code a bit keeping an eye on
>> Sonar and write unit tests for that.
>> I was writing unit test for the PDOutlineNode.getParent which gets the
>> parent node looking for a PARENT or a P key in the outline item
>> dictionary.
>> Now according to table 153 of the specs only PARENT should be there so I
>> was wandering if someone knows better why the P is there and if it should
>> be covered by the unit.
>>
>> BTW is it fine if I submit unit tests?
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: Outline parent with P key

Posted by Tilman Hausherr <TH...@t-online.de>.
Indeed, the P isn't mentioned in the spec. This has been there since 
2008, and we don't have the prior history. Probably somebody copied code 
from elsewhere. I'll remove it.
(I think I saw both elsewhere in a PDF, probably annotations)

Re: unit tests, better start small, to see that you don't do work that 
isn't used, and that you get a feeling about what is accepted.

Tilman

Am 07.02.2015 um 15:40 schrieb Andrea Vacondio:
> Hi,
> I'm trying to become more familiar with PDFBox code and I have a simple use
> case involving document outline. I decided to start looking at the fairly
> simple outline package, review it, clean the code a bit keeping an eye on
> Sonar and write unit tests for that.
> I was writing unit test for the PDOutlineNode.getParent which gets the
> parent node looking for a PARENT or a P key in the outline item dictionary.
> Now according to table 153 of the specs only PARENT should be there so I
> was wandering if someone knows better why the P is there and if it should
> be covered by the unit.
>
> BTW is it fine if I submit unit tests?
>


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