Skip to content
Document Viewer for Java App Dropwizard UI Modern Example
Java TypeScript JavaScript FreeMarker Dockerfile HTML CSS
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
DocumentSamples
Licenses
client
src
.gitattributes
.gitignore
.travis.yml
Dockerfile
LICENSE
README.md
configuration.yml
pom.xml

README.md

Document viewer

GroupDocs.Viewer for Java Dropwizard Example

version 1.14.26

Build Status Maintainability GitHub license

System Requirements

  • Java 8 (JDK 1.8)
  • Maven 3

Document Viewer API for Java Dropwizard

GroupDocs.Viewer for Java API allows you to view over 90 document formats including DOCX, PDF, PPT, XLS, among many others without any additional dependencies. Thanks to its flexible configuration it can be configured to view documents as images or as HTML5.

In order to demonstrate GroupDocs.Viewer for Java reach and powerful features we prepared a modern document viewer front-end web UI example. Which can be used as a standalone application or easily integrated into your project.

Note: without a license application will run in trial mode, purchase GroupDocs.Viewer for Java license or request GroupDocs.Viewer for Java temporary license.

Supported document Formats

Family Formats
Portable Document Format PDF
Microsoft Word DOC, DOCM , DOCX, DOT, DOTM, DOTX
Microsoft Excel XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
Microsoft PowerPoint PPT, POT, POTM, POTX, PPS, PPSM, PPSX, PPTM, PPTX
Microsoft Visio VSD, VDW, VDX, VSDX, VSS, VST, VSX, VTX
Microsoft Project MPP, MPT
Microsoft Outlook EML, EMLX, MSG
OpenDocument Formats ODT, ODP, ODS, OTT
Plain Text File TXT
Comma-Separated Values CSV
HyperText Markup Language HTML, MHT, MHTML, SVG
Extensible Markup Language XML,XML, XPS
AutoCAD Drawing File Format DGN, DWG, DXF
Image files BMP, CAL, DCX, DIB, EMF, GIF, JP2, JPG, MIL, MIL, PCD, PCT, PCX, PNG, PSD, RAS, TGA,TIFF,WMF
Electronic publication EPUB
Windows Icon ICO
Medical image files DCM

Demo Video

Features

  • Clean, modern and intuitive design
  • Easily switchable colour theme (create your own colour theme in 5 minutes)
  • Responsive design
  • Mobile support (open application on any mobile device)
  • Support over 90 documents and image formats including popular MS Office (Word, Excel, PowerPoint)
  • HTML and image document viewing modes
  • Fully customizable navigation panel
  • Open password protected documents
  • Text searching & highlighting
  • Download documents
  • Upload documents
  • Print document
  • Rotate pages
  • Zoom in/out documents without quality loss in HTML mode
  • Thumbnails
  • Smooth page navigation
  • Smooth document scrolling
  • Preload pages for faster document viewing
  • Multi-language support for displaying errors
  • Display two or more pages side by side (when zooming out)
  • Cross-browser support (Safari, Chrome, Opera, Firefox)
  • Cross-platform support (Windows, Linux, MacOS)

How to run

You can run this sample by one of following methods

Build from source

Download source code from github or clone this repository.

git clone https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java-Dropwizard
cd GroupDocs.Viewer-for-Java-Dropwizard
mvn clean compile exec:java
## Open http://localhost:8080/viewer/ in your favorite browser.

Binary release (with all dependencies)

Download latest release from releases page.

Note: This method is recommended for running this sample behind firewall.

curl -J -L -o release.tar.gz https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java-Dropwizard/releases/download/1.14.26/release.tar.gz
tar -xvzf release.tar.gz
cd release
java -jar viewer-1.14.26.jar configuration.yaml
## Open http://localhost:8080/viewer/ in your favorite browser.

Docker image

Use docker image.

mkdir DocumentSamples
mkdir 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
## Open http://localhost:8080/viewer/ in your favorite browser.

Configuration

For all methods above you can adjust settings in configuration.yml. By default in this sample will lookup for license file in ./Licenses folder, so you can simply put your license file in that folder or specify relative/absolute path by setting licensePath value in configuration.yml.

Viewer configuration options

Option Type Default value Description
filesDirectory String DocumentSamples Files directory path. Indicates where uploaded and predefined files are stored. It can be absolute or relative path
fontsDirectory String Path to custom fonts directory.
defaultDocument String Absolute path to default document that will be loaded automaticaly.
preloadPageCount Integer 0 Indicate how many pages from a document should be loaded, remaining pages will be loaded on page scrolling.Set 0 to load all pages at once
htmlMode Boolean true HTML rendering mode. Set false to view documents in image mode. Set true to view documents in HTML mode
zoom Boolean true Enable or disable Document zoom
search Boolean true Enable or disable document search
thumbnails Boolean true Enable thumbnails preview
rotate Boolean true Enable individual page rotation functionality
cache Boolean true Set true to enable cache
saveRotateState Boolean true If enabled it will save chages made by rotating individual pages to same file.
watermarkText String Text which will be used as a watermark

License

The MIT License (MIT).

Please have a look at the LICENSE.md for more details

GroupDocs Document Viewer on other platforms/frameworks

Resources

You can’t perform that action at this time.