You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Joshua Strauss <jo...@ssbbartgroup.com> on 2016/05/23 18:56:04 UTC

Migration strategy for getPageMap in PDDocument for version 2.0

Hello All,


We currently have code running on 1.8 that utilizes the getPageMap method in the PDDocument class and we are trying to migrate to 2.0. This method does not exist now as far as I can tell and am confused about how to restructure our code to account for the change. Does anyone have a break down on what I would need to do to successfully migrate the code?


Thanks


Joshua Strauss
Senior Developer
SSB Bart Group Inc.
joshua.strauss@ssbbartgroup.com
(415) 624-4218

Re: Migration strategy for getPageMap in PDDocument for version 2.0

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 23.05.2016 um 22:32 schrieb Maruan Sahyoun:
> Hi,
>> Am 23.05.2016 um 22:22 schrieb Tilman Hausherr <TH...@t-online.de>:
>>
>> Am 23.05.2016 um 20:56 schrieb Joshua Strauss:
>>> Hello All,
>>>
>>>
>>> We currently have code running on 1.8 that utilizes the getPageMap method in the PDDocument class and we are trying to migrate to 2.0. This method does not exist now as far as I can tell and am confused about how to restructure our code to account for the change. Does anyone have a break down on what I would need to do to successfully migrate the code?
>> Wow, I've heard of that one before. For what do you need this? "This will return the Map containing the mapping from object-ids to pagenumbers"
> I've used that before to get from bookmarks to pages.

Hmm, I think I get it.

@Joshua:
In 2.0, a page number can be received from a PDPage with this:

document.getPages().indexOf(PDPage)

is that what you were searching for?

Tilman


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


Re: Migration strategy for getPageMap in PDDocument for version 2.0

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,
> Am 23.05.2016 um 22:22 schrieb Tilman Hausherr <TH...@t-online.de>:
> 
> Am 23.05.2016 um 20:56 schrieb Joshua Strauss:
>> Hello All,
>> 
>> 
>> We currently have code running on 1.8 that utilizes the getPageMap method in the PDDocument class and we are trying to migrate to 2.0. This method does not exist now as far as I can tell and am confused about how to restructure our code to account for the change. Does anyone have a break down on what I would need to do to successfully migrate the code?
> 
> Wow, I've heard of that one before. For what do you need this? "This will return the Map containing the mapping from object-ids to pagenumbers"

I've used that before to get from bookmarks to pages.

Maruan

> 
> 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


Re: Migration strategy for getPageMap in PDDocument for version 2.0

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 23.05.2016 um 20:56 schrieb Joshua Strauss:
> Hello All,
>
>
> We currently have code running on 1.8 that utilizes the getPageMap method in the PDDocument class and we are trying to migrate to 2.0. This method does not exist now as far as I can tell and am confused about how to restructure our code to account for the change. Does anyone have a break down on what I would need to do to successfully migrate the code?

Wow, I've heard of that one before. For what do you need this? "This 
will return the Map containing the mapping from object-ids to pagenumbers"

Tilman

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


Re: Migration strategy for getPageMap in PDDocument for version 2.0

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

> Am 24.05.2016 um 00:21 schrieb John Hewson <jo...@jahewson.com>:
> 
> 
>> On 23 May 2016, at 11:56, Joshua Strauss <jo...@ssbbartgroup.com> wrote:
>> 
>> Hello All,
>> 
>> 
>> We currently have code running on 1.8 that utilizes the getPageMap method in the PDDocument class and we are trying to migrate to 2.0. This method does not exist now as far as I can tell and am confused about how to restructure our code to account for the change. Does anyone have a break down on what I would need to do to successfully migrate the code?
> 
> Well that depends on what you're trying to do. Why are you working with raw object ids to begin with?

AFAIK e.g. bookmarks (or better ouline items in spec terms) reference the page/object they are pointing to by their ID.

BR
Maruan

> 
> -- John
> 
>> Thanks
>> 
>> 
>> Joshua Strauss
>> Senior Developer
>> SSB Bart Group Inc.
>> joshua.strauss@ssbbartgroup.com
>> (415) 624-4218
> 
> ---------------------------------------------------------------------
> 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


Re: Migration strategy for getPageMap in PDDocument for version 2.0

Posted by John Hewson <jo...@jahewson.com>.
> On 23 May 2016, at 11:56, Joshua Strauss <jo...@ssbbartgroup.com> wrote:
> 
> Hello All,
> 
> 
> We currently have code running on 1.8 that utilizes the getPageMap method in the PDDocument class and we are trying to migrate to 2.0. This method does not exist now as far as I can tell and am confused about how to restructure our code to account for the change. Does anyone have a break down on what I would need to do to successfully migrate the code?

Well that depends on what you're trying to do. Why are you working with raw object ids to begin with?

-- John

> Thanks
> 
> 
> Joshua Strauss
> Senior Developer
> SSB Bart Group Inc.
> joshua.strauss@ssbbartgroup.com
> (415) 624-4218

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