Document

public final class Document implements AutoCloseable

Represents a document that can be opened, edited, and exported in various formats. Provides a unified interface for working with different document types including PDF, Word, Excel, and more.

Functions

Link copied to clipboard
public final void close()
Closes this resource and releases any associated native resources.
Link copied to clipboard
public final void export(String filepath, IExporter exporter)
Exports the document to a file using the specified exporter.
Link copied to clipboard
public final void exportAsHtml(String filepath)
Exports the document as Html format to the specified file path.
Link copied to clipboard
public final void exportAsImage(String filepath)
Exports the document as Image format to the specified file path.
Link copied to clipboard
public final void exportAsMarkdown(String filepath)
Exports the document as Markdown format to the specified file path.
Link copied to clipboard
public final void exportAsPdf(String filepath)
Exports the document as Pdf format to the specified file path.
Link copied to clipboard
public final void exportAsPresentation(String filepath)
Exports the document as Presentation format to the specified file path.
Link copied to clipboard
public final void exportAsSpreadsheet(String filepath)
Exports the document as Spreadsheet format to the specified file path.
Link copied to clipboard
public final void exportAsSvg(String filepath)
Exports the document as Svg format to the specified file path.
Link copied to clipboard
public final void exportAsWord(String filepath)
Exports the document as Word format to the specified file path.
Link copied to clipboard
public final PdfSettings getPdfSettings()
Gets the settings for Pdf
Link copied to clipboard
public final long getSettings()
Gets the settings associated with this document instance.
Link copied to clipboard
Gets the underlying document type (PDF, Word, Excel, etc.) of the opened document.
Link copied to clipboard
public final static Document open(String filePath)
Opens a document from a file path using default settings.
public final static Document open(String filePath, DocumentSettings settings)
Opens a document from a file path using specified settings.