[poppler] Problem understanding Optional Content
Leonard Rosenthol
leonardr at pdfsages.com
Tue Nov 6 13:47:24 PST 2007
On Nov 6, 2007, at 9:41 PM, Brad Hards wrote:
>> Then as you render, you need to check each piece of content to see if
>> it lies inside of an OCG, and whether that OCG is "On" or "Off" at
>> this time.
> Yep. What I don't see is "how do I tell if this item is part of an
> OCG or not"
> for most of the items.
Look in the content stream for /OC MC0 /BMC.
You need to track marked content operators and see what type of MC's
they are (since MC is used for a variety of things, of which OC is
just one). Remember that it's a stack, since you can have multiple
OCs on a single piece of content.
>> If you need any more samples or help - just holler! It would be
>> great to see a Poppler client support OCGs...
> Samples are always good :-) In particular, something showing OCMD, and
> something showing VEs would be very nice. Even nicer if we can
> redistribute
> them in our test cases.
>
Enclosed are two good OCMD test files - one with a simple "flat" set
and one that also demonstrates "hierarchical" grouping. You are
welcome to include them in your test cases.
I'll try to dig up an VE sample for you...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NestedLayers.pdf
Type: application/pdf
Size: 43905 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20071106/6f7de8eb/attachment-0002.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vis_policy_test.pdf
Type: application/pdf
Size: 60190 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20071106/6f7de8eb/attachment-0003.pdf
-------------- next part --------------
Leonard
More information about the poppler
mailing list