public final class ImageToPDF
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
autoOrientation |
private boolean |
landscape |
private PDRectangle |
mediaBox |
private boolean |
resize |
Modifier | Constructor and Description |
---|---|
private |
ImageToPDF() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
createPDFFromImages(PDDocument doc,
java.util.List<java.lang.String> imageFilenames) |
private static PDRectangle |
createRectangle(java.lang.String paperSize) |
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(PDRectangle mediaBox)
Sets page size of produced PDF.
|
private void |
usage()
This will print out a message telling how to use this example.
|
private PDRectangle mediaBox
private boolean landscape
private boolean autoOrientation
private boolean resize
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
void createPDFFromImages(PDDocument doc, java.util.List<java.lang.String> imageFilenames) throws java.io.IOException
java.io.IOException
private static PDRectangle createRectangle(java.lang.String paperSize)
public PDRectangle getMediaBox()
public void setMediaBox(PDRectangle mediaBox)
mediaBox
- public boolean isLandscape()
public void setLandscape(boolean landscape)
landscape
- public boolean isAutoOrientation()
public void setAutoOrientation(boolean autoOrientation)
autoOrientation
- true if auto, false if not.private void usage()