Examples of PDDestination


Examples of org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination

                if( bookmarks == null )
                {
                    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] );
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination

     * @throws IOException If there is an error creating the destination.
     */
    public PDDestination getDestination() throws IOException
    {
        COSBase base = getDictionary().getDictionaryObject( COSName.DEST );
        PDDestination retval = PDDestination.create( base );

        return retval;
    }
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination

     */
    protected boolean checkDest()
    {
        try
        {
            PDDestination dest = this.pdLink.getDestination();
            if (dest != null)
            {
                // ---- check the if an A entry is present.
                if (this.pdLink.getAction() != null)
                {
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination

     * @return The page that this outline will go to when activated or null if it does not point to anything.
     * @throws IOException If there is an error when trying to find the page.
     */
    public PDPage findDestinationPage( PDDocument doc ) throws IOException
    {
        PDDestination dest = getDestination();
        if( dest == null )
        {
            PDAction outlineAction = getAction();
            if( outlineAction instanceof PDActionGoTo )
            {
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination

    @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.documentnavigation.destination.PDDestination

    @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.documentnavigation.destination.PDDestination

     */
    protected boolean checkDest()
    {
        try
        {
            PDDestination dest = this.pdLink.getDestination();
            if (dest != null)
            {
                // ---- check the if an A entry is present.
                if (this.pdLink.getAction() != null)
                {
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination

    @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.documentnavigation.destination.PDDestination

    @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.documentnavigation.destination.PDDestination

     * @throws IOException If there is an error when trying to find the page.
     */
    public PDPage findDestinationPage( PDDocument doc ) throws IOException
    {
        PDPage page = null;
        PDDestination rawDest = getDestination();
        if( rawDest == null )
        {
            PDAction outlineAction = getAction();
            if( outlineAction instanceof PDActionGoTo )
            {
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.