Does FOP 2.1 support ViewerPreferences?

后端 未结 2 1038
逝去的感伤
逝去的感伤 2020-12-11 21:59

I\'m using FOP 2.1 and am trying to set ViewerPreferences, e.g. DisplayDocTitle -> true.

I\'m trying (from this question


            


        
2条回答
  •  被撕碎了的回忆
    2020-12-11 22:48

    According to the release notes FOP 2.0 introduced, among other things, a

    • Low level mechanism to augment PDF /Catalog and /Page dictionaries

    but there are not many examples of its usage in the website.

    Looking at the testcases included in the source distribution, in particular the ones named pdf-dictionary-extension_*.xml, I was able to put together something similar to your code which does not generate run-time exceptions; admittedly, I'm not familiar enough with this PDF feature to say whether the output actually achieves what you are trying to do:

    
      
        
          true
        
      
    
    
    • there is no , there is pdf:catalog instead
    • there is not a single element, but there is a specific element for each possible entry type: pdf:array, pdf:boolean, pdf:name, pdf:number, pdf:string, ...

    (disclosure: I'm a FOP developer, though not very active nowadays)

提交回复
热议问题