Hi,
By following the demo application in this link, we made a sample viewer application with .net core mvc. Do you have a javascript, css interface file for this application?
Thank you.
Hi,
By following the demo application in this link, we made a sample viewer application with .net core mvc. Do you have a javascript, css interface file for this application?
Thank you.
In case you’re looking for sources for the app from the post then you can download them at GitHub - usman-aziz/ASP.NET-Core-MVC-Document-Viewer: A universal document viewer in ASP.NET Core MVC for 140+ file formats..
In case you’re looking for the UI with reach features please check this example at GitHub that is using Angular UI. The demo can be found at File and Document Viewer | Conholdate Apps.
We made a viewer application for .net framework using groupdocs.viewer version 18.8.0. Since we have migrated our own application to .net core 3.1, we will upgrade groupdocs.viewer to version 19.10. Before proceeding, we downloaded the demo application from the link you sent for testing and ran the application. But in the old version, there were ready-made javascript files named groupdocs.viewer.js with features such as zoom and paging, we were using it. Do you have javascript files like this for version 19.10?
You can still use groupdocs.viewer.js
with 19.10 same as with the latest version 21.3. You have to migrate your server-side code to the new API. New API a bit different compared to the legacy one but the main responsibility of Viewer is still the same as it was before. Let us know if you have any issues with migration and we’ll try helping you.
Thank you. I want to ask something different. While using the 18.8.0 .net framework, we were able to paginate by a parameter like convertwordscompletely. How can we do this while developing the project from the beginning with .net core .mvc after 19.10. For example, when I gave a 100-page pdf or word, it was taking too long to open for the first time because it was trying to convert 100 pages into images or html at once. Then it would change it and convert the desired page and, if any, a before and after page to png, not the whole thing, but the interface as it wanted.
Sure, you can convert any pages. The second parameter of the View()
method accepts page numbers you want to render
using (Viewer viewer = new Viewer("sample.docx"))
{
ViewOptions viewOptions = new PngViewOptions();
viewer.View(viewOptions, 1, 2, 3);
viewer.View(viewOptions, 3, 2, 1);
viewer.View(viewOptions, new int[] { 4, 5, 6 });
viewer.View(viewOptions, new int[] { 6, 5, 4 });
}
To get the count of pages you can use GetViewInfo()
method, see How to get file type and pages count for more details.
Thank you. The main question I want to ask is this. When I open the Conholdate screen, I see a screen where I view the document and features such as zoom in, zoom out, print, download, previous page, next page at the top of the screen. In the application I developed using the 18.8.0 version, you provided these features and interface with the javascript and css files sent by you. I linked them to my code in the back-end part.
But when I try to develop the project from scratch with .net core mvc after 19.10, I cannot find such an interface when I download the source codes from the address you mentioned and run my project (features such as zoom in, zoom out, printing, download, previous page, next page). Can you send a javascript, css document for 19.10 and later .net core mvc project so that I can use these features? like the conholdate app. You said that I can use the interface elements in 18.8.0, but because one project is .net framework, the other is .net core mvc backend part and groupdocs library structures have changed a lot, the back-end part is very confusing. We write the project from scratch. Do you have the current version of the interface?
Please check net_core_app.zip (1.3 MB) that is a rough copy of GroupDocs.Viewer-for-.NET-MVC app. It uses the latest version of GroupDocs.Viewer for .NET 21.6 but you can try using 19.10 with it. I’m using 21.6 as there are many issues fixed since 19.10 so the latest version is performing better.
App structure
This is a sample .NET Core MVC app that was created by calling dotnet new mvc
. Most of the files have been copied from GroupDocs.Viewer-for-.NET-MVC project.
The main app folders are:
client
- Angular appFeatures
- Utils and code that used for backend processing and cachingFiles
- sample files for testing purposeswwwroot/js
- distribution Angular app javascript filesHow to run
To run the app you need to unpack the archive and call dotnet build
to build the app and dotnet run
to run it. Than navigate to https://localhost:5001
or http://localhost:5000
in your browser.
Hope this sample app will help to build your app.
Hello,
I cannot download the sample_app.zip file because I am not authorized. Can you check?
You have presented 2 different solutions, which way should I go?
the first is to use the GroupDocs.Viewer.UI package
The second is the following way.
Please check net_core_app.zip (1.3 MB) that is a rough copy of GroupDocs.Viewer-for-.NET-MVC app. It uses the latest version of GroupDocs.Viewer for .NET 21.6 but you can try using 19.10 with it. I’m using 21.6 as there are many issues fixed since 19.10 so the latest version is performing better.
Can you try downloading this sample_app.zip (152.4 KB)? The similar code could be found at GitHub.
I would recommend NuGet Gallery | GroupDocs.Viewer.UI 6.0.15 as it is much simpler to integrate Viewer with this package. The package code is open-source, so you can adjust it according to your requirements.