UPDATE:
I ended up using Flying-Saucer from the Maven repo: https://mvnrepository.com/artifact/org.xhtmlrenderer/flying-saucer-pdf
It was very simple to get this to work for me, here is a method I created to use this:
public static void generatePDF(String inputHtmlPath, String outputPdfPath)
{
try {
String url = new File(inputHtmlPath).toURI().toURL().toString();
System.out.println("URL: " + url);
OutputStream out = new FileOutputStream(outputPdfPath);
//Flying Saucer part
ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(url);
renderer.layout();
renderer.createPDF(out);
out.close();
} catch (DocumentException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
And here is the usage:
public static void main(String[] args){
String inputFile = "C:/Users/jrothst/Desktop/TestHtml.htm";
String outputFile = "C:/Users/jrothst/Desktop/TestPdf.pdf";
generatePDF(inputFile, outputFile);
System.out.println("Done!");
}
It worked very well to output the PDF and was very simple to use. It also handled the CSS in the html pretty well. Didn't use it for external CSS, but I believe that is possible too.