Sample Viewer application in WebForms .NET

@Rajesh2312

Please set default port in configuration.yml file.

Hi, Atirtahir,

I gone through this source: GitHub - groupdocs-viewer/GroupDocs.Viewer-for-.NET-WebForms at latest_jquery

Its working fine.

But instead of using controller I had written the code in aspx.cs page as a webmethod and I have added default document in .yml file. So,Now its hitting function loadDocument(callback{ through ajax call in viewer.js file and

But I facing issue in hitting webmethod, Its throughing some error image.png (28.3 KB)
because web method is using static keyword(It need to have all the function definition inside the scope of web method).

Can u give the edited source where LoadDocument(postedData, globalConfiguration.Viewer.GetPreloadPageCount() == 0); should have all the defination and initialization of all the function .

Then only I can able to call the webmethod.

Can u pls revert back as soon as possible.

Thanks & Regards
Rajesh Choudhary

@Rajesh2312

This project is to give you an idea how JS is used. But we have discontinued it’s support. As mentioned earlier, API is UI-Agnostic. Hence, you can develop your own document viewer application. Once source document is rendered, it’s up to you how you display the resultant files in browser.

Ok, thanks for the help, I am fine with Morder UI code.

I need one more help I am going through groupdocs annotation for MVC code, I want to load the document at the page load without choosing manual. I have configure default document in .yml file but still not able to load, can u share zip source which is loading document without manual…

ls revert as soon as possible.

Thanks & Regards
Rajesh Choudhary.

@Rajesh2312

Please share the updated .yml file. You can also point out the changes that you committed in the .yml file.

Below is my .yml file , you can see i have mention (defaultDocument: ‘AB.docx’).
This AB.docx is present in DocumentSamples/Annotation folder.

I have one more doubt if my document reside in share folder then where I have to mention that and what will be the sysntax for that, My share folder location is \172.16.3.130\fs\App_Data

################################################

Server configurations

################################################
server:
type: simple
applicationContextPath: /
adminContextPath: /admin
connector:
type: http
port: 8081

################################################

Application (global) configurations

################################################
application:
# License path
# Absolute path to GroupDocs license file
licensePath: ‘Licenses/GroupDocs.Annotation.NET.lic’

################################################

Common configurations

################################################
common:

File rewriting on document uploading

Set false to keep both files

Set true to replace files with same name

rewrite: true

Page navigation

Set false to disable document navigation (go to next, previous, last and first page)

pageSelector: true

Document download

Set false to disable document download

download: true

Document upload

Set false to disable document upload

upload: true

Document print

Set false to disable document print

print: true

File browser

Set false to disable document browse

browse: true

Set false to disable right mouse click

enableRightClick: true

################################################

GroupDocs.Viewer configurations

################################################
viewer:

Files directory path

Absolute path to files directory

filesDirectory: ‘DocumentSamples/Annotation’

Fonts path

Absolute path to custom fonts directory

fontsDirectory: ‘’

Default document

Absolute path to default document

defaultDocument: ‘AB.docx’

Pages preload

How many pages from a document should be loaded, remaining pages will be loaded on page scrolling

Set 0 to load all pages at once

preloadPageCount: 1

HTML rendering mode

Set false for image mode

Set true for HTML mode

htmlMode: true

Document zoom

Set false to disable document zooming

zoom: true

Document search

Set false to disable document text search

search: true

Thumbnails

Set false to disable thumbnails

thumbnails: true

Page rotation

Set false to disable pages rotation

rotate: true

Using cache

Set true to enable cache

cache: true

Set true to enable page rotation saving

saveRotateState: true

Enter text which will be used as a watermark

watermarkText: “”

Print secured documents mode

Set false to ignore document print security

Set true to check document print security

printAllowed: true

################################################

GroupDocs.Signature configurations

################################################
signature:

Files directory path

Absolute path to files directory

filesDirectory: ‘DocumentSamples/Signature’

Default document

Absolute or relative path to default document

defaultDocument: ‘’

Pages preload

How many pages from a document should be loaded, remaining pages will be loaded on page scrolling

Set 0 to load all pages at once

preloadPageCount: 0

Data directory path

Absolute path to signature cache files directory

dataDirectory: ‘’

Enable/disable text signature

textSignature: true

Enable/disable image signature

imageSignature: true

Enable/disable digital signature

digitalSignature: true

Enable/disable QR-Code signature

qrCodeSignature: true

Enable/disable Barcode signature

barCodeSignature: true

Enable/disable Stamp signature

stampSignature: true

Enable/disable Hand signature

handSignature: true

Enable/disable original document downloading

downloadOriginal: true

Enable/disable signed document downloading

downloadSigned: true

################################################

GroupDocs.Annotation configurations

################################################
annotation:

Files directory path

Absolute or relative path to files directory

filesDirectory: ‘DocumentSamples/Annotation’

Default document

Absolute or relative path to default document

defaultDocument: ‘’

Pages preload

How many pages from a document should be loaded, remaining pages will be loaded on page scrolling

Set 0 to load all pages at once

preloadPageCount: 0

Output directory path

Absolute path to annotated files directory

outputDirectory: ‘’

Fonts path

Absolute path to custom fonts directory

fontsDirectory: ‘’

Enable/disable Text annotation

textAnnotation: true

Enable/disable Area annotation

areaAnnotation: true

Enable/disable Point annotation

pointAnnotation: true

Enable/disable TextStrikeout annotation

textStrikeoutAnnotation: true

Enable/disable Polyline annotation

polylineAnnotation: true

Enable/disable TextField annotation

textFieldAnnotation: true

Enable/disable Watermark annotation

watermarkAnnotation: true

Enable/disable TextReplacement annotation

textReplacementAnnotation: true

Enable/disable Arrow annotation

arrowAnnotation: true

Enable/disable TextRedaction annotation

textRedactionAnnotation: true

Enable/disable ResourcesRedaction annotation

resourcesRedactionAnnotation: true

Enable/disable TextUnderline annotation

textUnderlineAnnotation: true

Enable/disable Distance annotation

distanceAnnotation: true

Enable/disable original document downloading

downloadOriginal: true

Enable/disable signed document downloading

downloadAnnotated: true

Enable/disable zoom

zoom: true

Enable/disable fit width

set true to zoom document pages fit width

fitWidth: true

################################################

GroupDocs.Comparison configurations

################################################
comparison:

Files directory path

Absolute path to files directory

filesDirectory: ‘DocumentSamples/Comparison’

FResult files directory path

Absolute path to result files directory

resultDirectory: ‘’

Result pages preload

How many pages from a result document should be loaded, remaining pages will be loaded on page scrolling

Set 0 to load all pages at once

preloadResultPageCount: 2

Enable/disable multi comparing feature

multiComparing: true

@Rajesh2312

This issue is resolved at our end. You’ll be notified once we release the fix.

OK, thanks for replying, want to know where I will be getting the notification for this fix Via mail or notification in this loop message.

@Rajesh2312

We’ll notify you here in the same thread.

Ok thanks will be waiting

I have a new requirement, I am looking for source for adding formfield through UI and after creating form user can download as a pdf.

I already gone through Asopose pdf source available in the github but its not having any UI (No able to achieve the requirement that the user can add form field while clicking in the UI).
Its having only C# code

Thanks & Regards
Rajesh

@Rajesh2312

This issue is now fixed. Please pull latest release.

Please note that Aspose.PDF is a back-end, UI-Agnostic API that you can implement in any of your .NET project. In case of any Aspose related queries, please post here.

Hi,

I have two issue:

  1. How I can remove the upload file button in UI image.png (9.1 KB)

  2. I have implemented groupdocs annotation as per my requirement, But the only only more issue I am facing is that I am getting black scrren after hosting the groudocs code. Its showing this image.png (61.4 KB)
    console issue, can u help me for solving this as a high pirorty.

Thanks Regards
Rajesh Choudhary.

@Rajesh2312

The UI part is coming from this package. However, you can do changes in it at your end but if the package is reinstalled your changes will be vanished. As mentioned earlier API is totally UI independent, you can develop your own layout/interface and take advantage of core API features (document rendering).

What changes you did in the project. Please mention them all. It’d be better if you share your complete project and steps to reproduce the issue.

Please note that all queries are assisted with first come first served basis. However, you can avail priority support in order to expedite the process.

Following the API code, it looks like the annotation API generates a PNG file to send to the browser. So what Javascript based editor tool are you using to edit/add annotations to the image before sending it down to the API to render it on the document? Is it custom built or some library you use?

@david.truong

Our demo applications are developed using Angular. However, you could use any JS framework of your choice to edit/add annotations.

I understand that but you didn’t answer the question. Is it a custom tool developed in house or is it a JS framework that you wrapped around it. Can your developers recommend a JS tool that people/GroupDocs have used?

Hi @david.truong !

Thank you for being so interested in GroupDocs products.
Let me share a few ideas that could help you find an appropriate solution.

Our GroupDocs.App applications like Viewer was implemented over the C# Backend and Angular Front-end part. So you are right this is an in-house Angular component.
With similar pages, we just provide a common view of possible product features. Besides that, we try to provide many alternatives you can find in the GroupDocs GitHub public examples.

For the few products, we have an additional UI package (see for Viewers, Comparison )

These packages can give you an idea of how to build with the embedded Angular codes.

It seems that you are looking JS Front-end solution that will allow you to easily customize the Front-end application for your Annotation App with GroupDocs.Annotation at the backend. For this moment we don’t have only JS implementation with certain JS frameworks/libraries. We used Angular for the front end.
I tried to check some possible solutions for the front-end and it seems you can try the JS frameworks like Fabric.js, and Paper.js that could be used for UI elements editor on the document background page as alternative elements layers.

Since our team is focused mostly on the backend libraries and our UI solutions are not for the sales at this moment our solutions can not be shared (Angular source code) but as I told you can see some basic Angular solutions over the samples on the Git Hub from GroupDocs.

Hope it will help you to make a choice and find a solution.
I will be happy to help you more.
Thank you!

Hi Yuriry,

Thanks for thanking the time to look at my question. We are evaluating the GroupDocs.Total package and with interest with the viewer and the annotation tools. I’m currently looking at the annotation. I understand how the backend works but it’s the front end Angular is what I’m not familiar with and hard for me to follow.

From what I saw in the API code, GroupDocs renders an image and sends it back to the browser with the annotation attributes. The front end I assume displays the image and adds the annotations to it so that you can edit. My confusion is the ability to add/edit, is that some custom JS you put together to do this or you using a JS framework with an image editor that does this? From what I read, it is my understanding that you are using your own JS to manipulate the image. Can you tell me where that JS file is then so I can start seeing how you are doing it. We are fine with what’s available in the demo but we would need to wrap it in another reactive framework like Vue.JS and do some modifications to fit into our existing portal.

Thanks,

Dave

Hello @david.truong!

Thank you for your interest in our products.
Please allow me to suggest exploring our GroupDocs.Total-Angular project on GitHub. This repository is a comprehensive source for several related projects and might offer you deeper insights.

In particular, within the GroupDocs.Total-Angular repository, you’ll find the TypeScript source code for the GroupDocs.Annotation editor. For instance, you can examine this Annotation component as an example.

I hope this resource will be helpful in enhancing your understanding of the source code of our examples. If you have any further questions, please feel free to ask.