Each xobject in my pdf is placed on its own layer.
The strange thing is that i am not (allthough i have read about this before)
able to find a reference to the oc in either of the objects streams.
The pdfs are genreated from Adobe Illustrator.
Any idea why the oc reference is left out?

Btw i do mean to change the object stream, not the page content stream.


On Mon, May 5, 2008 at 1:09 PM, 1T3XT info <[EMAIL PROTECTED]> wrote:

> Lars Eirik Rønning wrote:
> > Hi.
> > Is there an easy way to retrieve the part of the page content stream
> > which indicate the reference to a given ocg(layer)
>
> I guess you are looking for something like PRTokeniser;
> but I wouldn't say that offers an easy way to retrieve
> the operators and operands marked as optional content.
>
> > As I have understood there is no dictionary that indicates which layer
> > (ocg) an element is associated with, therefore i have to look at the
> stream.
>
> If the stream is a Page Content Stream, you'll find references
> to the OCGs used in the Page Resource Dictionary (look for the
> /Properties key). If an XObject is part of an OCG as a whole,
> you'll find an /OC entry in its stream dictionary.
>
> > My goal is to be able to navigate to the property which has the key /MC0
> > and retrieve the name of this layer.
>
> If the name is all you need, retrieve it through the
> /Properties entry in the Resources dictionary or through
> the /OC entry of an XObject. (There'll be indirect references
> there that will help you find the OCG dictionaries.)
>
> > If this layer is set to be edited i will replace the XObject with a new
> > one. (basically) having this work as a template(not a pdftemplate)
>
> Now you confuse me: are you talking about the content stream
> of a page or about an XObject? You're not being clear.
>
> > Can this be done.
>
> Maybe, but it's dangerous to change content streams 'semi-manually'.
> I would advise against it (even if it's possible).
> --
> This answer is provided by 1T3XT BVBA
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Do you like iText?
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Or leave a tip: https://tipit.to/itexttipjar
>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to