Skip to main content
Skip table of contents

Export Content using the Java API

Further utilise the functionality of Scroll PDF 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 PDF 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;

  1. Add the K15t Maven repository to your project or Maven settings
  2. Add the provided dependencies in your app's pom.xml

  3. Add the OSGi imports to your maven-confluence-plugin configuration in pom.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 PDF Exporter - for further examples please see our related documentation:

CODE
public class ApiExamples {

    @Autowired @ComponentImport private PdfExportService pdfExportService;


    public void exportWithDescendantPages(long rootPageId) throws IOException {
        PdfExportRequest exportRequest = pdfExportService.createExportRequest(rootPageId);
        PdfExportResult exportResult = pdfExportService.export(exportRequest);

        saveExportResultToDisk(exportResult);
    }


    public void exportSinglePage(long rootPageId) throws IOException {
        PdfExportRequest exportRequest = pdfExportService.createExportRequest(rootPageId)
                .withExportScope(PdfExportRequest.EXPORT_SCOPE_CURRENT);
        PdfExportResult exportResult = pdfExportService.export(exportRequest);

        saveExportResultToDisk(exportResult);
    }


}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.