https://issues.apache.org/bugzilla/show_bug.cgi?id=45390


Andreas L. Delmelle <[EMAIL PROTECTED]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22261|0                           |1
        is obsolete|                            |




--- Comment #2 from Andreas L. Delmelle <[EMAIL PROTECTED]>  2008-07-20 
01:09:29 PST ---
Created an attachment (id=22286)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22286)
updated prototype; some more experimenting...


The patch in attach disables processing of the extension in case PDF/A or PDF/X
conformance is active. Better safe than sorry. For users that really don't mind
the risk, we could still add a config option to override this.

On another note, adding a quick-and-dirty implementation for simple PDF strings
already allows adding some JavaScript as an OpenAction...

Most complete example I tested so far:

  <pdf:dictionary type="catalog"
xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf";>
    <pdf:name key="PageMode">FullScreen</pdf:name>
    <pdf:dictionary type="normal" key="ViewerPreferences">
      <pdf:boolean key="HideToolbar">true</pdf:boolean>
      <pdf:boolean key="HideWindowUI">true</pdf:boolean>
      <pdf:boolean key="FitWindow">true</pdf:boolean>
      <pdf:boolean key="CenterWindow">true</pdf:boolean>
      <pdf:name key="NonFullScreenPageMode">UseThumbs</pdf:name>
      <pdf:name key="PrintScaling">None</pdf:name>
    </pdf:dictionary>
    <pdf:dictionary type="normal" key="OpenAction">
      <pdf:name key="Type">Action</pdf:name>
      <pdf:name key="S">JavaScript</pdf:name>
      <pdf:string key="JS">this.print(false,0,this.numPages-1);</pdf:string>
    </pdf:dictionary>
  </pdf:dictionary>

The JavaScript was borrowed from Bugzilla #12610, which also attempted to
address this.

I'd say it's about time to look into adding some basic validation, shaving off
the rough edges (!!serialization!!), and adding some documentation and
testcases.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to