Free Support Forum - groupdocs.com

Resolution Options


#1

Hey i have downloaded open source front end code from github and running NewFrontEnd project, it works fine, but my only concern is the resolution, how can we configure the resolution settings for a document?


#2

Hi rajuldubey76,


Thanks for taking interest in our product.

What I get from your query is you are asking for the quality of the document view when it is rendered in the viewer. Please note that the API provides a feature to set the quality of the document in image based rendering. You can set ImageOptions.JpegQuality attribute to any value up to 100. Please see the code below:

//Initialize ImageOptions Object
ImageOptions options = new ImageOptions();

imageOptions.ConvertImageFileType = ConvertImageFileType.JPG;
imageOptions.JpegQuality = 100;

// Set password if document is password protected.
if (!String.IsNullOrEmpty(DocumentPassword))
options.Password = DocumentPassword;

//Get document pages in image form
List Images = imageHandler.GetPages(guid, options);

In this code, the quality of the output images is set to maximum value and as result, you will get very sharp images. By default this value is set to 90. Please try the above code in your application and share your experience.

If you have any further questions, please feel free to ask.

Warm Regards

#3

Thanks for response Aziz,


Basically i am talking bout responsiveness, i am trying to render it as HTML and it should fit the viewer window without any scroll bar and also it should be consistent across the screen sizes.

so, need your inputs

#4

Hi Rajul,


We apologize for inconvenience.

GroupDocs.Viewer for .NET v3.x is basically a back-end API which renders document into html and images. We cannot not have responsiveness inside the html as the documents may have different contents with different formatting styles. However, you can apply your custom logic to zoom-in and zoom-out the rendered html page according to the screen resolution. For your convenience, we have open source WebForms Front End application in which zoom in and zoom out functionality is implemented. You can download it and get help from it.

If you have any further questions, please let us know.

Warm Regards