groupdocs-viewer / GroupDocs.Viewer-for-.NET-UI

UI - User Interface for GroupDocs.Viewer for .NET document viewer and automation API.
MIT License
5 stars 2 forks source link

Prevent printing of original pdf document when pdf is rendered as jpg viewer type #58

Open sacerande opened 3 months ago

sacerande commented 3 months ago

Please, fill the following sections to help us to reproduce and fix the issue

What happened: Clicking on Print button actually attempts to print original pdf.

What you expected to happen: Jpg images rendered in the angular viewer needs to be printed.

How to reproduce it:

Source code sample:

Environment:

sacerande commented 3 months ago

It appears print button on legacy viewer prints images but not original pdf. This is to secure direct access to file.

vladimir-litvinchik commented 3 months ago

@sacerande

I got your point, and I believe it is valid when you want to protect the data from being copied. We'll take a look at how it can be fixed. As a temporary fix you can hide download and print buttons.

var builder = WebApplication.CreateBuilder(args);

builder.Services
    .AddGroupDocsViewerUI((config) =>
    {
        config.DisableFileDownload();
        config.DisablePrint();
    });

You can use this sample-app.zip as example.