Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel display in demos differs greatly from expected display #53

Open
ManuelHaas opened this issue Jan 23, 2024 · 5 comments
Open

Excel display in demos differs greatly from expected display #53

ManuelHaas opened this issue Jan 23, 2024 · 5 comments

Comments

@ManuelHaas
Copy link

Our customers tell us that the display of Excel documents sometimes differs greatly from the expected display.
I have therefore compared your ASP.NET Core demo with your online viewer at https://products.groupdocs.app/viewer/total.
Your online viewer displays Excel documents much more adequately than the demo (on which we have based our integration).
Below are two screenshots of a sample document that I have attached to this ticket:

Test.xlsx in ASP.NET Core demo:
image

Test.xlsx in online viewer:
image

How can I configure GroupDocs Viewer so that Excel documents are displayed in the same way as in your online viewer?

Test.xlsx

@vladimir-litvinchik
Copy link
Collaborator

@ManuelHaas

The online Viewer uses new version of Angular UI that is going to replace the current one. And renders files to PNG instead of HTML so the output looks different. You can configure this demo to work the same using the following code in Program.cs file

ViewerType viewerType = ViewerType.Png;

builder.Services
        .AddGroupDocsViewerUI(config => {
            config.SetViewerType(viewerType);
        });

builder.Services
        .AddControllers()
        .AddGroupDocsViewerSelfHostApi(config =>
        {
            config.SetLicensePath("GroupDocs.Viewer.lic");
            config.SetViewerType(viewerType);
            config.ConfigurePngViewOptions(viewOptions => {
                viewOptions.SpreadsheetOptions = SpreadsheetOptions.ForRenderingByPageBreaks();
                viewOptions.SpreadsheetOptions.RenderGridLines = true;
                viewOptions.SpreadsheetOptions.RenderHeadings = true;
                viewOptions.SpreadsheetOptions.SkipEmptyColumns = true;
                viewOptions.SpreadsheetOptions.SkipEmptyRows = true;
                viewOptions.SpreadsheetOptions.TextOverflowMode = 
                    TextOverflowMode.OverlayIfNextIsEmpty;
                viewOptions.SpreadsheetOptions.DetectSeparator = true;
                //Automatically detect CSV and TSV separator
                viewOptions.SpreadsheetOptions.DetectSeparator = true;
            });
        })
        .AddLocalStorage("./Files")
        .AddLocalCache("./Cache");
view-as-png

Also you can give a try a complete application - sample-app.zip.

@ManuelHaas
Copy link
Author

@vladimir-litvinchik This works perfectly. Thank you very much!
But here it comes. This works great for Excel documents, but Word or PDF documents look better with the previous rendering. Is it possible to activate this type of rendering only for Excel documents?

@vladimir-litvinchik
Copy link
Collaborator

@ManuelHaas

You're welcome!

Unfortunately, changing the output type from HTML to PNG is not possible in the current implementation. The packages were designed in a way where all the configuration is set once during application startup. Also, client-side Angular application is depends on this config.

@ManuelHaas
Copy link
Author

I understand. With the ViewerType.Png option, pdf documents are sometimes rendered blurred and unattractive. Text passages can also not be marked etc.
A slightly more flexible configuration would be really great here. Perhaps this can be taken into account in a future version.

@vladimir-litvinchik
Copy link
Collaborator

@ManuelHaas

Can you please attach the PDF file that you're opening? We'll take a look at how we can improve the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants