Free Support Forum -

Viewer of Java Library shows only plain text


I downloaded and testing GroupDocs Viewer for Java library example project from:

I successfully started the spring webapp on Tomcat.

If I upload any files(pdf, doc), the webapp shows thumbnail of the documents on the left side (of browser) well.
However in the main view, it showes only plain text. without any css style or images.

(I also inspected the rendered html, then the a style block above the content contained only ‘null’.)

Screen capture here:

Do you have any clue to investigate?

Thank you.

I can’t attach this file due to error : ‘You do not have permission to upload or link to files’.


Hello, Lee. We can’t confirm this error with our testing files. Can you upload your files to dropbox (as you did with the screenshot)?

OK, Actually my files are same as the example projects in your site. (/samples/spring)
You can check my files here:

Add to this, I didn't exactly follow your guide.

If I execute 'mvn clean install tomcat7:run' the error says:

[ERROR] Failed to execute goal on project viewer-tomcat: Could not resolve dependencies for project com.groupdocs:viewer-tomcat:war:2.0.0: Could not find artifact com.groupdocs:viewer:jar:2.0.0 in central ( -> [Help 1]

Version 2.0.0 does not exist in maven repository I think.

Because of this error, I downloaded the version 2.0.0 jar file directly, and added it to my Java build path.

(2.0.0 jar file here:

I am running tomcat with intelliJ IDEA.

Thank you your help.


You can install the library into your local maven repository. Don’t know if IntelliJ IDEA has this ability on the UI, but I think that does, because NetBeans provides it.

Looked into you provided, but had not found sample files there.

Can you provide those files which you are trying to view. Files which by your words are rendered without CSS in the GroupDocs.Viewer.

Asked our Java developer who uses IntelliJ IDEA how to install library locally. You can just add the configuration as on the sample here: and then run maven build.


I didn’t know that I could install the library into my local maven repository. I have no error with maven now, thanks for telling me.

The file I converted here:|%20Inc.pdf

I tested with several files and all I tested were not able to be viewed with css styles.

Also I found your sample project has a little bug.
If I select a file from input file tag and upload it, it redirects without context path.
Your pom.xml file setting’s context path is ‘document-viewer’
I had to replace it to /.
or I could add the context path to url in browser and reloaded.
==> should be :

Last, I changed a

==> ‘false’ was default value.

Hello, Lee.
Glad to see it was useful for you. In pom file we use context path 'document-viewer' since earlier version of Viewer could work only from this path. Now this issue is fixed and Viewer works from any path, from root and from context. So this is not a bug,

As for style issue – this is a known bug and we work on it, in next release it will be fixed.
Please stay tuned and check new release for this fix.
Also If you have any additional questions please feel free to get back in touch.