Package net.sourceforge.tess4j.util
Class PdfGsUtilities
java.lang.Object
net.sourceforge.tess4j.util.PdfGsUtilities
PDF utilities based on Ghostscript.
-
Field Summary
-
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.
-
Field Details
-
GS_INSTALL
- See Also:
-
-
Constructor Details
-
PdfGsUtilities
public PdfGsUtilities()
-
-
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
-