Free Support Forum - groupdocs.com

How to show documents on load


#1

I want to show single document upon loading of the viewer. can you help me how to do it.
We do not need to browse from list.


#2

@rajrip713,

You can provide the absolute path of the document to the defaultDocument property in configuration.yml file.


#3

But i need it at run time to change the default document. so can we pass document path while loading the viewer or after the viewer loaded. to call the loadDocumentDescription with document list right after viewer loaded


#4

@rajrip713,

Could you please provide us some more details about the workflow of your requested feature and the expected output?


#5

I have run the GroupDocs.Viewer-for-Java-Spring-1.14.25 using mvn clean spring-boot run. now the localhost:8080.viewer opening the page.
now the page shows the viewer with browse below
viewer_load_page.png (14.6 KB)
And then i hva eot select from document list and then the required document opens in viewer
after_document_page.jpg (195.9 KB)

Our requirement is to open any document by localhost:8080/viewer/documentname.
so that we do not want to show choose list of documents. one document selected from our UI and then we open viewer in iframe to show the document.


#6

can you please upload simple folder structure with html, js and css files from which we can make changes on our own. everytime we need to make changes to UI we have to build the war. this is too much work to be done. for groupdocs java spring

please upload a simple process where simple folder structure is built and once the war file built we can update the files on our own choice.

we are in process of buying license from groupdocs but the process seems to be more time taking.


#7

@rajrip713,

Thanks for sharing the details. Please have a look at this comment which provides a sample application and related details to deal with a similar use-case.

I am afraid that such a structure is not available. You may have a look at this commit to know about the changes required to customize the application on your own.


#8

http://localhost:8080/gv/viewer/?url=http://localhost:8080/JULY_2019_CHARGE_INTERNET.pdf
this is not working

setting default document also not working in groupdocs java spring with temporary license. please help quick.

The url one is required because if there are 3 users need to view different documents at same point if time. please help me fix it. the URL one


#9

@rajrip713,

Please make sure that the file is accessible using the URL that you have provided in the query string. For example, you may try url=https://calibre-ebook.com/downloads/demos/demo.docx and it will display demo.docx. Alternatively, if your files are already located on your server, you can pass the file’s path in the URL param as url=file:///D:/storage/candy.pdf.

Furthermore, you can also customize the constructor logic in GroupDocs.Viewer-for-Java-Spring/client/apps/viewer/src/app/custom-viewer/custom-viewer.component.ts file to fit your use-case.

It was a known issue (filed as Issue #44) and has been fixed in the latest release of the front end.