Export Content using the Java API
Further utilise the functionality of Scroll HTML Exporter in your custom Java app by using our public Scroll Exporter Java API. By using the Scroll Exporter API in your custom Java app, you can:
perform an export with a specific configuration
list the export templates used with Scroll HTML Exporter
automate exports depending on your requirements
use your custom Java app to trigger an export depending on your specific needs
Getting started
The public APIs can be used by adding a Maven dependency to the project. To use the Java API you need to;
Add the K15t Maven repository to your project or Maven settings
Add the provided dependencies in your app's
pom.xml
Add the OSGi imports to your
maven-confluence-plugin
configuration inpom.xml
To access all the related information for using the Scroll Exporter Java API with your custom app, please see our documentation.
Have you checked out our API docs?
For information pertaining to the classes, fields and methods used for the Scroll Exporter Java API, please see our API documentation.
Additionally, we’re also publishing the sources and javadocs of the API classes through our Maven repository. This means you can tell your IDE to fetch this content so you can see the documentation directly within the IDE.
API usage example
The following examples demonstrate how to export using Scroll HTML Exporter - for further examples please see our related documentation:
public class ApiExamples {
@Autowired @ComponentImport private HtmlExportService htmlExportService;
public void exportWithDescendantPages(long rootPageId) throws IOException {
HtmlExportRequest exportRequest = htmlExportService.createExportRequest(rootPageId);
HtmlExportResult exportResult = htmlExportService.export(exportRequest);
saveExportResultToDisk(exportResult);
}
public void exportSinglePage(long rootPageId) throws IOException {
HtmlExportRequest exportRequest = htmlExportService.createExportRequest(rootPageId)
.withExportScope(HtmlExportRequest.EXPORT_SCOPE_CURRENT);
HtmlExportResult exportResult = htmlExportService.export(exportRequest);
saveExportResultToDisk(exportResult);
}
}