Package org.apache.pdfbox.pdmodel.interactive.action

Examples of org.apache.pdfbox.pdmodel.interactive.action.PDActionGoTo


                {
                    throw new IOException( "Error: The PDF does not contain any bookmarks" );
                }
                PDOutlineItem item = bookmarks.getFirstChild().getNextSibling();
                PDDestination dest = item.getDestination();
                PDActionGoTo action = new PDActionGoTo();
                action.setDestination(dest);
                document.getDocumentCatalog().setOpenAction(action);

                document.save( args[1] );
            }
            finally
View Full Code Here


{

    @Test
    public void testGoto_OK() throws Exception
    {
        PDActionGoTo gotoAction = new PDActionGoTo();
        gotoAction.setDestination(new PDDestination()
        {
            public COSBase getCOSObject()
            {
                return COSName.getPDFName("ADest");
            }
View Full Code Here

    }

    @Test
    public void testGoto_KO_invalidContent() throws Exception
    {
        PDActionGoTo gotoAction = new PDActionGoTo();
        gotoAction.setDestination(new PDDestination()
        {
            public COSBase getCOSObject()
            {
                return new COSDictionary();
            }
View Full Code Here

    }

    @Test
    public void testGoto_KO_missingD() throws Exception
    {
        PDActionGoTo gotoAction = new PDActionGoTo();
        valid(gotoAction, false, PreflightConstants.ERROR_ACTION_MISING_KEY);
    }
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.pdmodel.interactive.action.PDActionGoTo

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.