Am 01.05.2011 13:43, schrieb Peter Rolf:
> Am 01.05.2011 13:14, schrieb Peter Rolf:
>> Hi Hans,
>>
>> using the 'Report PDF syntax issues'-preflight in Acrobat9 gives a
>> warning about an 'Unexpected value for this key'.
>> I used 'pdf-x4p.mkiv' from /texmf-context/tex/context/test/ as test file.
>> Probably just a warning about a redundancy (see 'PDF Reference, version
>> 1.7.pdf', p376), setting 'BaseState /ON' in combination with '/ON [
>> whatever] /OFF [whatever]'.
>> Removing 'BaseState /ON' results in a flawless PDF.
>>
> ... but results in a
> 
> 'Optional content configuration dictionary has no BaseState entry'
> 
> when preflighting PDF/X-4p.
> 
> Maybe setting 'BaseState' to 'Unchanged' would be an option here, but
> the note in the reference says:
> 
> "If BaseState is present in the document's default configuration
> dictionary, its value must be ON."
> 
> What a mess!
> 
> I think it's better to ignore the preflight warning about BaseState...
>

I was stubborn and found the culprit. The value simply has to be '\ON'
and not '\On'. That's all.

[lpdf-ren.lua]

local function flushtextlayers()
    if viewerlayers.supported then
        if pagelayers then
            pdfflushobject(pagelayersreference,pagelayers)
        end
        for i=1,#cache do
            local ci = cache[i]
            pdfflushobject(ci[1],ci[2])
        end
        if textlayers and #textlayers > 0 then -- we can group them if
needed, like: layout
            local d = pdfdictionary {
                OCGs = textlayers,
                D    = pdfdictionary {
                    Name      = "Document",
                    Order     = (viewerlayers.hasorder and textlayers)
or nil,
                    ON        = videlayers,
                    OFF       = hidelayers,
                    BaseState = pdfconstant("ON"),
                },
            }
            lpdf.addtocatalog("OCProperties",d)
            textlayers = nil
        end
    end
end



>>
>> Regards, Peter
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
>>
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to