com.aspose.pdf.facades

Class IPdfFileEditor.ContentsResizeParameters

  • java.lang.Object
    • com.aspose.pdf.facades.IPdfFileEditor.ContentsResizeParameters
  • Enclosing interface:
    IPdfFileEditor


    public static class IPdfFileEditor.ContentsResizeParameters
    extends Object

    Class for specifing page resize parameters. Allow to set the following parameters: Size of result page (width, height) in default space units or in percents of initial pages size; Left, Top, Bottom and Right margins in default space units or in percents of initial page size; Some values may be left null for automatic calculation. These values will be calculated from rest of page size after calculation explicitly specified values. For example: if page width = 100 and new page width specified 60 units then left and right margins are automatically calculated: (100 - 60) / 2 = 15. This class is used in ResizeContents method.

    • Method Detail

      • setLeftMargin

        public void setLeftMargin(IPdfFileEditor.ContentsResizeValue value)

        Gets or sets left margin on the resultant page.

        Parameters:
        value - ContentsResizeValue object
      • setRightMargin

        public void setRightMargin(IPdfFileEditor.ContentsResizeValue value)

        Gets or sets right margin on the resultant page.

        Parameters:
        value - ContentsResizeValue object
      • setTopMargin

        public void setTopMargin(IPdfFileEditor.ContentsResizeValue value)

        Gets or sets top margin on the resultant page.

        Parameters:
        value - ContentsResizeValue object
      • setBottomMargin

        public void setBottomMargin(IPdfFileEditor.ContentsResizeValue value)

        Gets or sets bottom margin on the resultant page.

        Parameters:
        value - ContentsResizeValue object
      • getContentsWidth

        public IPdfFileEditor.ContentsResizeValue getContentsWidth()

        Gets or sets width of the content of the source page on the resultant page.

        Returns:
        ContentsResizeValue object
      • setContentsWidth

        public void setContentsWidth(IPdfFileEditor.ContentsResizeValue value)

        Gets or sets width of the content of the source page on the resultant page.

        Parameters:
        value - ContentsResizeValue object
      • getContentsHeight

        public IPdfFileEditor.ContentsResizeValue getContentsHeight()

        Gets or sets height of the content of the source page on the resultant page.

        Returns:
        ContentsResizeValue object
      • setContentsHeight

        public void setContentsHeight(IPdfFileEditor.ContentsResizeValue value)

        Gets or sets height of the content of the source page on the resultant page.

        Parameters:
        value - ContentsResizeValue object
      • margins

        public static IPdfFileEditor.ContentsResizeParameters margins(double left,
                                                      double right,
                                                      double top,
                                                      double bottom)

        Creates resize parameters with specifed margins value. Contents size is automatically calculated.

        Parameters:
        left - Left margin.
        right - Right margin.
        top - Top margin.
        bottom - Bottom margin.
        Returns:
        Created resize parameters.
      • marginsPercent

        public static IPdfFileEditor.ContentsResizeParameters marginsPercent(double left,
                                                             double right,
                                                             double top,
                                                             double bottom)

        Creates resize parameters. Margins are specified in percents of initial page size.

        Parameters:
        left - Left margin (in percents of page width).
        right - Right margin (in percents of page height).
        top - Top margin (in percents of page height).
        bottom - Bottom margin (in percents of page height).
        Returns:
        Returns new resize parameters.
      • contentSize

        public static IPdfFileEditor.ContentsResizeParameters contentSize(double width,
                                                          double height)

        Creates resize parameters with specified contents size.

        Parameters:
        width - New width of contents.
        height - New height of contetns.
        Returns:
        Returns new resize parameters.
      • contentSizePercent

        public static IPdfFileEditor.ContentsResizeParameters contentSizePercent(double width,
                                                                 double height)

        Creates resize parameters with specified conets size in percents of initial page size. Margins are caculated automatically.

        Parameters:
        width - New content width in percents.
        height - New contents height in percents.
        Returns:
        New resize parameters.
      • pageResize

        public static IPdfFileEditor.ContentsResizeParameters pageResize(double width,
                                                         double height)

        Creates resize paramters for page resize.

        Parameters:
        width - New page width in units.
        height - New page height in units.
        Returns:
        New resize paramteres.
      • pageResizePct

        public static IPdfFileEditor.ContentsResizeParameters pageResizePct(double widthPct,
                                                            double heightPct)

        Creates resize paramters for page resize. New sizes are specified in percent.

        Parameters:
        widthPct - New page width in percents.
        heightPct - New page height in percents.
        Returns:
        New resize paramteres.