public class PdfFileConverter
extends java.lang.Object
| Constructor and Description | 
|---|
PdfFileConverter(ScrapingSession session,
                java.lang.String pathToPdfToHtmlExecutable)
Creates the processor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
java.lang.String | 
outputPrettyXML(org.jdom2.Element root)
Outputs the root as pretty XML 
 | 
PdfToHtmlParseData | 
parsePdfFile(java.io.File file)
Parses the given file, and returns the root Element of the document, or null if the document failed to parse or had no root. 
 | 
PdfToHtmlParseData | 
parsePdfFile(java.lang.String file)
Parses the given file, and returns the root Element of the document, or null if the document failed to parse or had no root. 
 | 
org.jdom2.Element | 
parseString(java.lang.String xmlString)
Parses the string and returns the XML Element 
 | 
org.jdom2.Element | 
parseXmlFile(java.io.File file,
            java.lang.String encoding)
Parses the given file, and returns the root Element of the document, or null if the document failed to parse or had no root. 
 | 
org.jdom2.Element | 
parseXmlFile(java.lang.String file,
            java.lang.String encoding)
Parses the given file, and returns the root Element of the document, or null if the document failed to parse or had no root. 
 | 
public PdfFileConverter(@Nullable ScrapingSession session, @NotNull java.lang.String pathToPdfToHtmlExecutable)
session - The current session (for logging purposes)pathToPdfToHtmlExecutable - The location of PDF to HTMLpublic java.lang.String outputPrettyXML(@NotNull org.jdom2.Element root)
root - The root node@Nullable public org.jdom2.Element parseString(@NotNull java.lang.String xmlString) throws org.jdom2.JDOMException, java.io.IOException
xmlString - The xml stringElement representing the root of the xmljava.io.IOException - On error with IO (shouldn't happen)org.jdom2.JDOMException - On error parsing the input string@Nullable public org.jdom2.Element parseXmlFile(@NotNull java.lang.String file, @Nullable java.lang.String encoding) throws java.io.IOException, org.jdom2.JDOMException
file - The file to parseencoding - The encoding of the file, or null to use the System defaultjava.io.IOException - On error reading the fileorg.jdom2.JDOMException - On error parsing the file@Nullable public org.jdom2.Element parseXmlFile(@NotNull java.io.File file, @Nullable java.lang.String encoding) throws java.io.IOException, org.jdom2.JDOMException
file - The file to parseencoding - The encoding of the file, or null to use the system defaultjava.io.IOException - On error reading the fileorg.jdom2.JDOMException - On error parsing the file@Nullable public PdfToHtmlParseData parsePdfFile(@NotNull java.lang.String file)
file - The file to parse@Nullable public PdfToHtmlParseData parsePdfFile(@NotNull java.io.File file)
file - The file to parse