Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

pdf/a and actions

2008-04-23
2012-12-07
  • AProfile.java mentions these as excluded.

    private String[] excludedActions = {
            "Launch", "Sound", "Movie", "ResetForm",
            "ImportData", "JavaScript"
        };

    The pdf/a spec mentions that the set-state and no-op actions are also excluded. The pdf 1.2 spec names these as SetState and Nop, so these should be added to the list?

    Named actions:

    A new array should be made, like this

        private String[] allowedNamedActions = {
                "NextPage", "PrevPage", "FirstPage", "LastPage"
        };

    In ActionOk(PdfDictionary action) something like this should be added

                if ("Named".equals(actStr)){//Only 4 named actions allowed
                    PdfSimpleObject actName = (PdfSimpleObject) action.get("N");
                    String actNameStr = actName.getStringValue();
                    for (i = 0; i < allowedNamedActions.length; i++) {
                        if (!allowedNamedActions[i].equals (actStr)) {
                            return false;
                        }
                    }
                }

     
    • Gary McGath
      Gary McGath
      2008-04-28

      I did most of the work on the PDF/A profile while it was still in a draft state, and this may account for some discrepancies between the profile and the final definition. Any serious work which I do on JHOVE these days has to be on my own time, so I can't guarantee when I'll get to putting in fixes. I understand that your situation prevents you from submitting fixes just now. Perhaps I'll set aside some time during a weekend to bring PDF/A up to date.