Package org.apache.pdfbox.tools
Class PrintPDF
java.lang.Object
org.apache.pdfbox.tools.PrintPDF
This is a command line program that will print a PDF document.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static PrintRequestAttributeSet
createPrintRequestAttributeSet
(PDDocument document, String duplex) getMediaSizesFromPrintService
(PrintService printService) getTraysFromPrintService
(PrintService printService) static void
Infamous main method.private static void
private static void
usage()
This will print the usage requirements and exit.
-
Field Details
-
PASSWORD
- See Also:
-
SILENT
- See Also:
-
PRINTER_NAME
- See Also:
-
ORIENTATION
- See Also:
-
BORDER
- See Also:
-
DPI
- See Also:
-
NOCOLOROPT
- See Also:
-
DUPLEX
- See Also:
-
TRAY
- See Also:
-
MEDIA_SIZE
- See Also:
-
-
Constructor Details
-
PrintPDF
private PrintPDF()private constructor.
-
-
Method Details
-
main
Infamous main method.- Parameters:
args
- Command line arguments, should be one and a reference to a file.- Throws:
PrinterException
- if the specified service cannot support the Pageable and Printable interfaces.IOException
- if there is an error parsing the file.
-
getTraysFromPrintService
-
getMediaSizesFromPrintService
-
createPrintRequestAttributeSet
private static PrintRequestAttributeSet createPrintRequestAttributeSet(PDDocument document, String duplex) -
usage
private static void usage()This will print the usage requirements and exit. -
showAvailablePrinters
private static void showAvailablePrinters()
-