Title: Re: [iText-questions] RE: Object reference retrieving
By "it can't be done" I mean "you can't retrieve the new reference without
substantial programming effort", it's not OCG specific. This involves
changing PdfWriter and PdfReaderInstance.
You may get away with just changing PdfWriter.getNewObjectNumber() to peek
at the new number.
The sequence would be:

- add all the pages you need
- observe PdfWriter.getNewObjectNumber()
- do PdfWriter.freeReader() to output the pages and get the reference
- use the captured reference




From: [EMAIL PROTECTED] on behalf of Nikolay Nikolov
Sent: Sat 27-Nov-04 12:25
To: [EMAIL PROTECTED]
Subject: Re: [iText-questions] RE: Object reference retrieving

Hello, Paulo

I believe by "it can't be done" you meant bookmarks with OCG hiding/showing.
I know that currently it can't be done. In fact that's what i intend
to do - write some support for OCG bookmarks. My question was : How
can i retrieve the newly assigned object reference number in the
generated PDF, given that i know the object reference number in the
old document.

be best
Nikolay


On Fri, 26 Nov 2004 17:12:29 -0000, Paulo Soares <[EMAIL PROTECTED]> wrote:
> Currently it can't be done. That functionality will be available by the
> end of the year as a by-product of the multiple signature support.
>
>
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]] On
> > Behalf Of Nikolay Nikolov
> > Sent: Friday, November 26, 2004 4:10 PM
> > To: [EMAIL PROTECTED]
> > Subject: [iText-questions] RE: Object reference retrieving
> >
> > >On Fri, 26 Nov 2004 14:59:11 Paulo wrote:
> > >You can't keep the reference number and you don't have to.
> > iText may not
> > >know about certain objects but will copy them anyway.
> >
> >
> > I don't need to preserve the original reference number, but just to
> > retrieve the newly assigned one in my document. I need this because
> > I'm planning to add some bookmarks for hiding/showing some OC groups,
> > but i have only their reference numbers in the original PDF.
> >
> > greets
> > Nikolay
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from
> > real users.
> > Discover which products truly live up to the hype. Start reading now.
> > http://productguide.itmanagersjournal.com/
> > _______________________________________________
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to