Skip to content

Latest commit

 

History

History

README.md

GroupDocs.Viewer for Java - Dropwizard Demo

A web-based document viewer built with GroupDocs.Viewer for Java and Dropwizard 1.3.

Supports viewing 170+ document formats (DOCX, PDF, PPT, XLS, images, CAD, and more) as HTML5 or images. See the full list of supported formats.

System Requirements

  • Java 8+ (JDK 1.8)
  • Maven 3

How to Run

git clone https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java.git
cd GroupDocs.Viewer-for-Java/Demos/Dropwizard
mvn clean compile exec:java

Open http://localhost:8080/viewer/ in your browser.

Docker

Build and run locally:

docker build -t groupdocs-viewer-dropwizard .
mkdir -p DocumentSamples Licenses
docker run -p 8080:8080 \
  --env application.hostAddress=localhost \
  -v $(pwd)/DocumentSamples:/home/groupdocs/app/DocumentSamples \
  -v $(pwd)/Licenses:/home/groupdocs/app/Licenses \
  groupdocs-viewer-dropwizard

Pre-built images are also available on Docker Hub. See the main README for available tags.

Configuration

Edit configuration.yml to adjust settings. Place your license file in the Licenses/ folder or set licensePath in configuration.yml.

Option Type Default Description
filesDirectory String DocumentSamples Directory for uploaded and predefined files (absolute or relative path)
fontsDirectory String Path to custom fonts directory
defaultDocument String Absolute path to document loaded automatically on startup
preloadPageCount Integer 0 Pages to preload (0 = load all at once)
htmlMode Boolean true true for HTML rendering, false for image rendering
zoom Boolean true Enable document zoom
search Boolean true Enable text search
thumbnails Boolean true Enable thumbnails preview
rotate Boolean true Enable page rotation
cache Boolean true Enable rendering cache
saveRotateState Boolean true Persist page rotation to the file
watermarkText String Watermark text overlay

Note: Without a license, the application runs in evaluation mode. Request a temporary license to test all features.

License

The MIT License (MIT). See LICENSE for details.

Resources

Product Page | Documentation | API Reference | Online Demo | Blog | Free Support | Temporary License