Closed erjezus closed 4 years ago
Hi @erjezus. As far as I understand, you want to customize viewer in a way that it will be able to open a document using some kind of identifier passed in URL. I prepared an example of this use case in a separate branch (also check out what was added/changed).
This example expects to receive a URL of the document in a query string. EX:
http://localhost:8080/viewer/?url=https://calibre-ebook.com/downloads/demos/demo.docx
then it downloads this file to a server and opens it in Viewer.
You can modify constructor logic to fit your use case. For example, instead of using URL to download and open a downloaded file you can use another identifier or filename to open files you already have at your server.
Let me know if this solution works for you.
Hello, I am deploying the application with the war profile with finalName viewerDocument. Currently I get this error when starting.
Thanks.
@erjezus by default we assume that API located at http://localhost:8080. In order to change this to your custom endpoint simply modify this line
Hi @erjezus, Let us know if this solution works for you and we can close this issue.
Hi, the solution works correctly. But I need the viewer options bar too. Also if the document contains a URL as hyperlink does not work.
Hi @egorovpavel,
Any update regarding this issue? We are waiting for two issues:
Thank you!
Hi @erjezus. The provided branch was intended to showcase the way to customize the behavior and appearance of the GroupDocs.Viewer application. I updated this branch and reverted to the original view and stylings.
In case you need to customize the original appearance just edit files related with custom component https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java-Spring/tree/custom-viewer-example/client/apps/viewer/src/app/custom-viewer
Regarding the issue with the links in the document I was unable to reproduce this issue, please provide a document where we can reproduce this issue.
FYI @mjim79
These two documents contain url, the viewer shows them as text. We have performed tests even with the test viewer (https://products.groupdocs.app/viewer)
Hi @erjezus, I tried both files and was able to view and click on links
Make sure that you are using correct rendering mode (htmlMode = true
) in configuration.yml
Hi @egorovpavel , Try the following pdf document please. In the configuration it is defined as html. Thanks.
@erjezus Please try in the latest version of GroupDocs.Viewer.
Hi @erjezus , the problem was reproduced in the lastest version of groupdocs-viewer, so we reported the bug for groupdocs-viewer team.
Hi @erjezus , I added fix for rendering links from pdf files. Please, try the latest version.
Forum: https://forum.groupdocs.com/t/params-url/7489/2
I need to go through the URL the name or path of the document to display or set the documentDefault attribute. Could you tell me how? Thanks