Package org.apache.pdfbox.preflight.action

Examples of org.apache.pdfbox.preflight.action.ActionManagerFactory


        valid(action.getCOSDictionary(), valid, expectedCode);
    }

    protected void valid(COSDictionary action, boolean valid, String expectedCode) throws Exception
    {
        ActionManagerFactory fact = new ActionManagerFactory();
        PreflightContext ctx = createContext();
        COSDictionary dict = new COSDictionary();
        dict.setItem(COSName.A, action);

        // process the action validation
        List<AbstractActionManager> actions = fact.getActionManagers(ctx, dict);
        for (AbstractActionManager abstractActionManager : actions)
        {
            abstractActionManager.valid();
        }
View Full Code Here


        configuration.replacePageProcess(RESOURCES_PROCESS, ResourcesValidationProcess.class);
        configuration.replacePageProcess(FONT_PROCESS, FontValidationProcess.class);
        configuration.replacePageProcess(ACTIONS_PROCESS, ActionsValidationProcess.class);
        configuration.replacePageProcess(ANNOTATIONS_PROCESS, AnnotationValidationProcess.class);

        configuration.actionFact = new ActionManagerFactory();
        configuration.annotFact = new PDFAbAnnotationFactory();
        configuration.colorSpaceHelperFact = new ColorSpaceHelperFactory();
        return configuration;
    }
View Full Code Here

        valid(action.getCOSDictionary(), valid, expectedCode);
    }

    protected void valid(COSDictionary action, boolean valid, String expectedCode) throws Exception
    {
        ActionManagerFactory fact = new ActionManagerFactory();
        PreflightContext ctx = createContext();
        COSDictionary dict = new COSDictionary();
        dict.setItem(COSName.A, action);

        // process the action validation
        List<AbstractActionManager> actions = fact.getActionManagers(ctx, dict);
        for (AbstractActionManager abstractActionManager : actions)
        {
            abstractActionManager.valid();
        }
View Full Code Here

        configuration.replacePageProcess(RESOURCES_PROCESS, ResourcesValidationProcess.class);
        configuration.replacePageProcess(FONT_PROCESS, FontValidationProcess.class);
        configuration.replacePageProcess(ACTIONS_PROCESS, ActionsValidationProcess.class);
        configuration.replacePageProcess(ANNOTATIONS_PROCESS, AnnotationValidationProcess.class);

        configuration.actionFact = new ActionManagerFactory();
        configuration.annotFact = new PDFAbAnnotationFactory();
        configuration.colorSpaceHelperFact = new ColorSpaceHelperFactory();
        return configuration;
    }
View Full Code Here

            COSDictionary actionsDict = (COSDictionary) vPath.peek();
            // AA entry is authorized only for Page, in this case A Page is just before the Action Dictionary in the path
            boolean aaEntryAuth = ((vPath.size() - vPath.getClosestTypePosition(PDPage.class)) == 2);

            PreflightConfiguration config = context.getConfig();
            ActionManagerFactory factory = config.getActionFact();
            List<AbstractActionManager> la = factory.getActionManagers(context, actionsDict);
            for (AbstractActionManager aMng : la)
            {
                aMng.valid(aaEntryAuth);
            }
        }
View Full Code Here

        valid(action.getCOSDictionary(), valid, expectedCode);
    }

    protected void valid(COSDictionary action, boolean valid, String expectedCode) throws Exception
    {
        ActionManagerFactory fact = new ActionManagerFactory();
        PreflightContext ctx = createContext();
        COSDictionary dict = new COSDictionary();
        dict.setItem(COSName.A, action);

        // process the action validation
        List<AbstractActionManager> actions = fact.getActionManagers(ctx, dict);
        for (AbstractActionManager abstractActionManager : actions)
        {
            abstractActionManager.valid();
        }
View Full Code Here

        configuration.replacePageProcess(RESOURCES_PROCESS, ResourcesValidationProcess.class);
        configuration.replacePageProcess(FONT_PROCESS, FontValidationProcess.class);
        configuration.replacePageProcess(ACTIONS_PROCESS, ActionsValidationProcess.class);
        configuration.replacePageProcess(ANNOTATIONS_PROCESS, AnnotationValidationProcess.class);

        configuration.actionFact = new ActionManagerFactory();
        configuration.annotFact = new PDFAbAnnotationFactory();
        configuration.colorSpaceHelperFact = new ColorSpaceHelperFactory();
        return configuration;
    }
View Full Code Here

        COSDictionary actionsDict = (COSDictionary) vPath.peek();
        // AA entry is authorized only for Page, in this case A Page is just before the Action Dictionary in the path
        boolean aaEntryAuth = ((vPath.size() - vPath.getClosestTypePosition(PDPage.class)) == 2);

        PreflightConfiguration config = context.getConfig();
        ActionManagerFactory factory = config.getActionFact();
        List<AbstractActionManager> la = factory.getActionManagers(context, actionsDict);
        for (AbstractActionManager aMng : la)
        {
            aMng.valid(aaEntryAuth);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.preflight.action.ActionManagerFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.