| | |
| | | |
| | | import static org.asciidoctor.Asciidoctor.Factory.create; |
| | | import org.asciidoctor.Asciidoctor; |
| | | import static org.asciidoctor.AttributesBuilder.attributes; |
| | | import static org.asciidoctor.OptionsBuilder.options; |
| | | |
| | | |
| | | |
| | |
| | | * nach PDF transformiert werden soll |
| | | */ |
| | | private void transform(String fileName, String backend) { |
| | | /* |
| | | Map<String, Object> attributes = new HashMap<>(); |
| | | attributes.put("no_footer", false); |
| | | attributes.put("source_highlighter", "highlightjs"); |
| | | //attributes.put("source_highlighter", "highlightjs"); |
| | | |
| | | Map<String, Object> options = new HashMap<>(); |
| | | options.put("attributes", attributes); |
| | |
| | | if(null != backend) { |
| | | options.put("backend", backend); |
| | | } |
| | | */ |
| | | |
| | | Map<String, Object> attributes = attributes().sourceHighlighter("highlightjs") |
| | | .asMap(); |
| | | Map<String, Object> options = options().inPlace(false).attributes(attributes) |
| | | .asMap(); |
| | | |
| | | |
| | | Asciidoctor asciidoctor = create(); |
| | | asciidoctor.convertFile(new File(fileName), options); |