Class AddPage

java.lang.Object
org.jpedal.manipulator.AddPage
All Implemented Interfaces:
Manipulation

public class AddPage extends Object implements Manipulation
Inserts blank pages to a document
  • Constructor Summary

    Constructors
    Constructor
    Description
    AddPage(PageRanges pages, float[] mediaBox)
    Inserts a new blank page, before the specified page.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(org.jpedal.io.annotation.utils.AnnotInfo info)
    Applies the manipulation to the current document

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AddPage

      public AddPage(PageRanges pages, float[] mediaBox)
      Inserts a new blank page, before the specified page.
      Note: each new page is inserted relative to the original document state. For example, inserting pages 1–3 into a 5-page document results in: new 1, old 1, new 2, old 2, new 3, old 3, old 4, old 5 not: new 1, new 2, new 3, old 1, old 2, old 3, old 4, old 5
      Parameters:
      pages - the pages which the new pages will be inserted before, all following pages are shifted by 1. Page indexes start from 1. To append a page to the end of the file, supply 1 higher than the file page index.
      mediaBox - the media box (dimensions) of the page in the form [lower-left x, lower-left y, upper-right x, upper-right y]. See PaperSize for common paper sizes.
  • Method Details

    • apply

      public void apply(org.jpedal.io.annotation.utils.AnnotInfo info) throws IOException
      Description copied from interface: Manipulation
      Applies the manipulation to the current document
      Specified by:
      apply in interface Manipulation
      Parameters:
      info - the AnnotInfo object for the currently loaded document
      Throws:
      IOException - if the manipulation cannot be applied to the document