Free Support Forum - groupdocs.com

GroupDocs.Viewer Sample Viewer

Hi,

I have previously used GroupDocs.Viewer up to version 3. I would like to move onto version 3, however, at the moment I don't want to build my own viewer.

Therefore, I'd like to use the sample implementation. However, I don't work in a Spring environment. Previously there was no Spring dependency in the Viewer - control was handled through web.xml mappings for example.

Is there a sample viewer for GroupDocs.Viewer version 3+ which doesn't have a dependency on Spring?

Thanks,

Simon

Hi Simon,


Thanks for showing your interest in GroupDocs.Viewer for Java.

We would like to apprise you that Next Generation GroupDocs.Viewer for Java is a totally UI-Less API. Hence, we have provided both UI and UI-Less example/showcase projects on offical GitHub repository.
Our showcase project is developed in Spring Framework. Ultimately it has a dependency on Spring Framework. However, console example project has no dependency, you can experience all the functionalities in this console project, provided by the API.

Please give it a try and share your experience.
We would like to hear your views.

Best Wishes

Hi Atir,

Yeah, I've seen the documentation and the GitHub repo.

What I need to do though is replicate exactly what I have with 2.x with the new 3.x version.

It's great that you've done the new development, but I can't afford to spend hours developing a new UI when there was a perfectly good one built into 2.x. I need to move onto 3.x with the least effort in a non-Spring environment.

Is there anyway I can get the sample UI to work without Spring?

Thanks,

Simon

Hi Simon,


You can tell us about your preferred framework (wicket6, JSF etc), we will include that in our support development plan.

Many Thanks

Hi Atir,

I don't use any framework. Just pure Java/JSP.

I would expect it to work something like the basic 2.x viewer, with a bunch of Servlets with relevant mappings in the web.xml.

Ideally you would provide a basic UI with no framework dependencies at all - you used to do this with version 2.x

Thanks,

Simon

Hi Simon,


Thanks for sharing your thoughts.
We have added this issue in our support development plan. We will inform you soon as we get any update.
Stay tuned.

Best Regards


Hi Simon,


We are glad to inform you that GroupDocs.Viewer for Java Servlets based front end is available for download. You can download and explore the front end.

You may find following resources helpful:
Servlets Based GroupDocs.Viewer for Java Front End Project - Download Project
Servlets Based GroupDocs.Viewer for Java Front End Project Documentation - Project Documentation

Have a nice weekend ahead.
Best Wishes

Any updates on this?

I'm stuck using Version 2 of the viewer because I can't upgrade to Version 3 until I have an example viewer I can swap the version 2 viewer out for.

This is now critical for me as I really need to upgrade.

Thanks,

Simon

Hi,

Thanks for this, good to see you have produced this.

I think there are some issues when setting 'useHtmlBasedEngine : true'. Has this been tested?

I needed to make some changes when I set this to 'true'.

Within ViewDocumentParameters, I needed to create userId and privateKey. In GetResourceForHtml I needed to implement the doGet method. And I think there were one or two other tweaks I had to make as well to make it work.

I have attached my Eclipse project here.

The main problem I have is that when loading a PNG first, the image doesn't display when useHtmlBasedEngine is set to true - please see my project attached.

If I load a PDF first that's fine, then load a PNG that's fine. But when I set the PNG to load in the index.png I just get a blank window.

Can you investigate please?

Many thanks,

Simon

Hi Simon,


We are currently investigating this issue. We cannot provide any ETA at the moment.
As we have any update on it, we’ll notify you.

Kind Regards

Hi Simon,


Thanks for sharing your experience and the project with us.
We are going to investigate it and we will share our findings with you.

Kind Regards

Hi Simon,


We are able to reproduce this issue at our end as well. Hence, we have logged this issue at GitHub. Please follow this link for future correspondence and further updates regarding this issue.

Many Thanks

Hi Simon,


<span style=“color: rgb(76, 82, 89); font-family: “PT Sans”, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 18px; background-color: rgb(221, 221, 221);”>I think there are some issues when setting ‘useHtmlBasedEngine : true’. Has this been tested?
We would like to apprise you that the issue you reported against one of our showcase projects (Servlets based front end) has been resolved.
You can pull latest update from here.

Have a nice weekend ahead.
Best Wishes
I think there is still an issue with the GetResourceForHtml servlet. Currently on ln 38 you have.

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

}

I needed to change that to:

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}

As I was getting 405 405 method not allowed errors. This is *not* the error I'm reporting however.

Here is the Eclipse project which if run will highlight the problem:

https://www.dropbox.com/s/slwovift3a457br/gd_servlet.zip?dl=0

I haven't made any changes to the example project other the one change mentioned above, and some local path tweaks (license file, storage location, etc).

The main issue is that I still cannot get the example viewer to load image files. Below is a link to a Word document describing the issue, with screenshots.

https://www.dropbox.com/s/rqe70u3eou9j4cq/gd_images.docx?dl=0

To summarise, when setting the default file to load, in the index.jsp file, to be an image the image doesn't load correctly. If I choose to open a PDF/docx, that loads fine. Then when I reload the image again it works fine. It's just the first time load that is the problem. I can reproduce this issue every time with the code in the attached project.

Thanks,
Simon

Hi Simon,


Can you please confirm that you set embedded resources true ?

HtmlOptions htmlOptions = new HtmlOptions();
htmlOptions.setResourcesEmbedded(true);

Waiting for your response.
Thanks
Hi Arti,

Thanks for the tip. I didn't have embedded resources true, as you'd have seen from the source code I gave you access to.

I've updated line 45 of GetDocumentPageHtml and line 74 of ViewDocument to read htmlOptions.setResourcesEmbedded(true);

Unfortunately, making the change hasn't helped, and I still get the same result. The first time the page loads the viewer won't display the image. If I then load a PDF that renders fine, then following that if I open the image it then displays.

If you run the Eclipse project I've given you, you'll be able to recreate the issue every time.

If it would help, I'd be happy to have a Skype screen share to show you.

Many thanks,
Simon


Hi Simon,


We are investigating your project. As we have any update, we will inform you.
However, we are not able to reproduce this issue in our project.

Many Thanks

Hi Simon,


We have updated our Servlets based showcase project. Fetch the latest project from here. Now, viewer will display image when it will load for the first time. Furthermore, find the attached screenshot of the working project.

Many Thanks
Hi Arti,

Thanks for the update.

As you say, the viewer now displays images when it loads for the first time.

Unfortunately, several other issues now seem to have been introduced.

When loading the demo.docx file, the first page is rendered, but not properly. When scrolling down the second page, nothing loads, the loading spinner just spins forever.

When load the candy.pod document, the first page seems to be loaded OK. When scrolling down however, nothing loads, the loading spinner just spins forever.

Would you be able to look into these issues please? I've attached a Word document with screenshots showing the issues, and also attached my Eclipse project.

Many thanks,
Simon



Hi Simon,


Sorry for the inconvenience you are facing. We are able to reproduce this issue at our end as well.
We have logged this issue at GitHub. Please follow this link for future correspondence and further updates regarding this issue.

Have a nice weekend ahead.
Kind Regards