Class PDFextStatic
- java.lang.Object
-
- edu.upf.taln.dri.common.connector.pdfext.localappo.PDFextStatic
-
public class PDFextStatic extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static PDFEXTparser
pdfEXTparser
-
Constructor Summary
Constructors Constructor Description PDFextStatic()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PDFEXTresult
convertHTMLtoXML(String HTMLcontents)
Receive as input an HTML file generated from a PDF and returns the result of the conversion to XML as an instance of the objectPDFEXTresult
.static PDFEXTresult
convertPDF(String PDFfullPath, String appoFolderFullPath)
IMPORTANT: this method works only with PDF2HTMLext installed in the PC where it is executed! Given the full local path of a PDF file and the full local path of an temporary folder where it is possible to write and delete files, this method converts the PDF file into HTML / XML and returns the conversion results.static String
convertPDFtoHTML(String PDFfilePath, String storageFolder)
Converts the .pdf file at PDFfilePath into a .html file with the same name and store the .html file in the storageFolder.static void
main(String[] args)
-
-
-
Field Detail
-
pdfEXTparser
public static final PDFEXTparser pdfEXTparser
-
-
Method Detail
-
convertPDFtoHTML
public static String convertPDFtoHTML(String PDFfilePath, String storageFolder)
Converts the .pdf file at PDFfilePath into a .html file with the same name and store the .html file in the storageFolder. The full local path of the stored HTML file is returned; if error occurs null is returned.- Parameters:
PDFfilePath
-storageFolder
-- Returns:
- the full local path of the stored HTML file; if errors occurs null is returned.
-
convertHTMLtoXML
public static PDFEXTresult convertHTMLtoXML(String HTMLcontents)
Receive as input an HTML file generated from a PDF and returns the result of the conversion to XML as an instance of the objectPDFEXTresult
.- Parameters:
HTMLcontents
-- Returns:
-
convertPDF
public static PDFEXTresult convertPDF(String PDFfullPath, String appoFolderFullPath)
IMPORTANT: this method works only with PDF2HTMLext installed in the PC where it is executed! Given the full local path of a PDF file and the full local path of an temporary folder where it is possible to write and delete files, this method converts the PDF file into HTML / XML and returns the conversion results.- Parameters:
PDFfullPath
-appoFolderFullPath
-- Returns:
-
main
public static void main(String[] args)
-
-