Package org.pdfclown.documents

Examples of org.pdfclown.documents.DocumentActions


    Document document = file.getDocument();

    // 2. Applying actions...
    // 2.1. Local go-to.
    {
      DocumentActions documentActions = document.getActions();
      if(documentActions == null)
      {
        document.setActions(documentActions = new DocumentActions(document));
        document.update();
      }
      /*
        NOTE: This statement instructs the PDF viewer to go to page 2 on document opening.
      */
      documentActions.setOnOpen(
        new GoToLocal(
          document,
          new LocalDestination(
            document.getPages().get(1), // Page 2 (zero-based index).
            Destination.ModeEnum.Fit,
            null
            )
          )
        );
      documentActions.update();
    }
   
    // 2.2. Remote go-to.
    {
      Page page = document.getPages().get(1); // Page 2 (zero-based index).
View Full Code Here

TOP

Related Classes of org.pdfclown.documents.DocumentActions

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.