6 Replies Latest reply: Oct 25, 2012 7:19 AM by A. Grahn RSS

    /BaseState /OFF not allowed in default "/D" OC configuration dict. Why?

    A. Grahn Community Member

      What is the logic behind this rule imposed by the PDF Spec? It makes absolutely sense to have OCGs in a document made invisible by default, and only a few, selected ones made visible by referencing them in the /ON array. BTW, although not allowed, the /BaseState /OFF plus /ON [...] combination is perfectly acknowledged by AdobeReader.

        • 1. Re: /BaseState /OFF not allowed in default "/D" OC configuration dict. Why?
          lrosenth Adobe Employee

          Can you point out where you think the PDF Standard (ISO 32000-1:2008) has this rule?

          • 2. Re: /BaseState /OFF not allowed in default "/D" OC configuration dict. Why?
            A. Grahn Community Member

            It seems that the ISO is less restrictive than the precedent PDF-Specs up to v. 1.7.

             

            ISO 32000-1:2008, Table 101, Page 229: "If BaseState is present in the document’s default configuration

            dictionary, its value shall be ON."

             

            PDF-Reference, 6th edition (PDF-1.7), Table 4.51, Page 376: "Note: If BaseState is present in the document’s default configuration dictionary, its value must be ON."

             

            Ghostscript with epswrite output device produces a warning when it encounters /BaseState /OFF in the input PDF file:

             

             

             

             

            Warning:  Default viewing OC config dictionary has /BaseState /OFF

            ...

            This file had errors that were repaired or ignored.

            • 3. Re: /BaseState /OFF not allowed in default "/D" OC configuration dict. Why?
              lrosenth Adobe Employee

              Ah – now I see what you are getting at.

               

              Remember that BaseState is the default value for all of the OCGs in referenced in the OCCD.   BUT you can always override on an OCG by OCG basis.   This requirement is to say that for the Default configuration, the default state for any OCG shall be ON (/BaseState /ON).

               

              That make sense?

              • 4. Re: /BaseState /OFF not allowed in default "/D" OC configuration dict. Why?
                A. Grahn Community Member

                What is OCCD?

                 

                I have a flat OC hirarchy, no recursive OC visibility dependencies. All OCGs are listed as references in the /OCGs array of the /OCProperties dictionary, as required. In /OCProperties, I put the required default viewing configuration dictionary "/D" with the contents: <</BaseState/OFF /ON [refs of selected OCGs to be visible]>> which is apparently non-conforming to the spec. I don't want it the other way around, that is, to say /BaseState/ON and to specify a long list of invisible OCGs into the /OFF [] array, because it is much longer than /BaseState/OFF /ON [a few visible OCGs].

                 

                The rule cited in my previous message simply doesn't make sense.

                • 5. Re: /BaseState /OFF not allowed in default "/D" OC configuration dict. Why?
                  lrosenth Adobe Employee

                  Optional Content Configuration Dictionary (Table 101 ☺).

                   

                  Correct, you need to invert your settings – so that the BaseState is ON and then simply list the ones you want off in the /OFF array.

                   

                  Whether it makes sense or not doesn’t really matter.  The fact is that the standard is very clear that doing it the way you want will create a non-valid PDF file.

                   

                  Acrobat & Reader are NOT validators or strict processors, because there are a lot of invalid PDFs out there and our customers simply expect things to “work”.  So if we can work around broken PDFs we will.    But DO NOT take that as a recommendation for making bad PDFs, since there are other stricter processors out there. (and also validation tools, including Acrobat’s Preflight).

                  • 6. Re: /BaseState /OFF not allowed in default "/D" OC configuration dict. Why?
                    A. Grahn Community Member

                    I was afraid to hear that. Still, the logic behind the rule is unclear. Thanks, nevertheless.