Package net.sourceforge.tess4j.util
Class PdfBoxUtilities
java.lang.Object
net.sourceforge.tess4j.util.PdfBoxUtilities
PDF utilities based on PDFBox.
- Author:
- Robert Drysdale, Quan Nguyen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic File[]
convertPdf2Png
(File inputPdfFile) Converts PDF to PNG format.static File
convertPdf2Tiff
(File inputPdfFile) Converts PDF to TIFF format.static int
getPdfPageCount
(File inputPdfFile) Gets PDF Page Count.static void
Merges PDF files.static void
Splits PDF.
-
Constructor Details
-
PdfBoxUtilities
public PdfBoxUtilities()
-
-
Method Details
-
convertPdf2Tiff
Converts PDF to TIFF format.- Parameters:
inputPdfFile
- input file- Returns:
- a multi-page TIFF image
- Throws:
IOException
-
convertPdf2Png
Converts PDF to PNG format.- Parameters:
inputPdfFile
- input file- Returns:
- an array of PNG images
- Throws:
IOException
-
splitPdf
Splits PDF.- Parameters:
inputPdfFile
- input fileoutputPdfFile
- output filefirstPage
- begin pagelastPage
- end page
-
getPdfPageCount
Gets PDF Page Count.- Parameters:
inputPdfFile
- input file- Returns:
- number of pages
-
mergePdf
Merges PDF files.- Parameters:
inputPdfFiles
- array of input filesoutputPdfFile
- output file
-