Class ImageToPDF

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Integer>

    public final class ImageToPDF
    extends java.lang.Object
    implements java.util.concurrent.Callable<java.lang.Integer>
    Create a PDF document from images.
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageToPDF()
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Integer call()  
      org.apache.pdfbox.pdmodel.common.PDRectangle getMediaBox()
      Sets page size of produced PDF.
      boolean isAutoOrientation()
      Gets whether page orientation (portrait / landscape) should be decided automatically for each page depending on image proportion.
      boolean isLandscape()
      Tells the paper orientation.
      static void main​(java.lang.String[] args)  
      void setAutoOrientation​(boolean autoOrientation)
      Sets whether page orientation (portrait / landscape) should be decided automatically for each page depending on image proportion.
      void setLandscape​(boolean landscape)
      Sets paper orientation.
      void setMediaBox​(org.apache.pdfbox.pdmodel.common.PDRectangle mediaBox)
      Sets page size of produced PDF.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImageToPDF

        public ImageToPDF()
        Constructor.
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • call

        public java.lang.Integer call()
        Specified by:
        call in interface java.util.concurrent.Callable<java.lang.Integer>
      • getMediaBox

        public org.apache.pdfbox.pdmodel.common.PDRectangle getMediaBox()
        Sets page size of produced PDF.
        Returns:
        returns the page size (media box)
      • setMediaBox

        public void setMediaBox​(org.apache.pdfbox.pdmodel.common.PDRectangle mediaBox)
        Sets page size of produced PDF.
        Parameters:
        mediaBox - the media box of the PDF document.
      • isLandscape

        public boolean isLandscape()
        Tells the paper orientation.
        Returns:
        true for landscape orientation
      • setLandscape

        public void setLandscape​(boolean landscape)
        Sets paper orientation.
        Parameters:
        landscape - use landscape orientation.
      • isAutoOrientation

        public boolean isAutoOrientation()
        Gets whether page orientation (portrait / landscape) should be decided automatically for each page depending on image proportion.
        Returns:
        true if auto, false if not.
      • setAutoOrientation

        public void setAutoOrientation​(boolean autoOrientation)
        Sets whether page orientation (portrait / landscape) should be decided automatically for each page depending on image proportion.
        Parameters:
        autoOrientation - true if auto, false if not.