Package net.sourceforge.tess4j.util
Class PdfUtilities
java.lang.Object
net.sourceforge.tess4j.util.PdfUtilities
PDF utilities based on PDFBox.
-
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 int
getPdfPageCount
(String inputPdfFile) Deprecated.As of Release 3.0.static void
Merges PDF files.static void
Splits PDF.static void
Deprecated.As of Release 3.0.
-
Constructor Details
-
PdfUtilities
public PdfUtilities()
-
-
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
public static void splitPdf(String inputPdfFile, String outputPdfFile, String firstPage, String lastPage) Deprecated.As of Release 3.0.Splits PDF.- Parameters:
inputPdfFile
- input fileoutputPdfFile
- output filefirstPage
- begin pagelastPage
- end page
-
splitPdf
Splits PDF.- Parameters:
inputPdfFile
- input fileoutputPdfFile
- output filefirstPage
- begin pagelastPage
- end page
-
getPdfPageCount
Deprecated.As of Release 3.0.Gets PDF Page Count.- Parameters:
inputPdfFile
- input file- Returns:
- number of pages
-
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
-