Examples of PDActionGoTo


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

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

{

    @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

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

    }

    @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

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

    }

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

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

{

    @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

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

    }

    @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

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

    }

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

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

        try {
            document = PDDocument.load(url);
            PDPage tocPage = (PDPage) document.getDocumentCatalog().getAllPages().get(tocPageIndex);
            for (Map.Entry<String, PDAction> entry : extractLinks(tocPage).entrySet()) {
                if (entry.getValue() instanceof PDActionGoTo) {
                    PDActionGoTo anchor = (PDActionGoTo) entry.getValue();
                    internalLinks.put(entry.getKey(), getDestinationText(anchor.getDestination()));
                }
            }
        } finally {
            if (document != null) {
                document.close();
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.interactive.action.type.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

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

            {
                retval = new PDActionJavaScript( action );
            }
            else if( PDActionGoTo.SUB_TYPE.equals( type ) )
            {
                retval = new PDActionGoTo( action );
            }
            else if( PDActionLaunch.SUB_TYPE.equals( type ) )
            {
                retval = new PDActionLaunch( action );
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.