AsciidoctorJ's "convertFile(s)" methods don't return html

Posted by sean.osterberg on
URL: https://discuss.asciidoctor.org/AsciidoctorJ-s-convertFile-s-methods-don-t-return-html-tp2771.html

Hi there, I'm trying out AsciidoctorJ and the sample code from the readme doesn't work as described. It doesn't return an html string but instead creates an html file in the same directory as the Asciidoc file to convert:

From the readme file:
String html = asciidoctor.convertFile(
    new File("sample.adoc"),
    new HashMap<String, Object>());
System.out.println(html);

This code will create a file named sample.html in the same directory. How can I get the convertFile(s) methods to return an html string? It should be noted the convert("blah blah") method does work as expected and returns an html string. Should I file an issue?

Thanks,
Sean