@vladimir.litvinchik Great, Thank you!
There are two updates in the latest version of GroupDocs.Viewer.UI 8.0.2
The feature where images are printed instead of PDF in image mode was moved from version 6.0.x to 8.0.x.
File name
This feature was fixed and now hides file name from top bar and thumbnails pane.
Also, you can set the file name using your implementation of IFileNameResover
interface and registering a service:
builder.Services.AddTransient<IFileNameResolver, MyFileNameResolver>();
public class MyFileNameResolver : IFileNameResolver
{
public Task<string> ResolveFileNameAsync(string file)
{
return Task.FromResult($"Custom file name for {file}");
}
}
To get the changes update you GroupDocs.Viewer.UI
and GroupDocs.Viewer.UI.*
packages to the latest 8.0.2
version.
The complete list of changes can be found in the release notes
Please let us know if you have any questions.
Hi @vladimir.litvinchik Thanks for updating. I am noticing following problems with the upgrade.
We have PreloadPageCount set to 300
Viewing document of 98 pages ( < 300)
Issues observed -
-
When loaded pdf in the viewer, it renders all pages, sometimes few are missing either in thumbnail or itâs actual page. (need to scroll or click on print button to load them, and sometimes it doesnât load altogether.)
Here is the screenshot for âsample_pdf_printing_problem_1.pdfâ that was shared with this ticket.
image.png (44.1 KB) -
Simple scroll operation sometimes shows scrolling 5-6 pages at a time as that appears in page number field. (may be double check the page no fix is correctly applied)
-
Clicking print button - following loading pages popup always loads clicking on print button, even though pages are already rendered, and it takes a while to finish. (may be making calls to backend again)
image.png (6.0 KB)
Thank you for reporting this issues, weâll analyze them and update you. The issue ID for reference is VIEWERNET-5240.
Iâm sorry for the delayed response. The issues you have listed are planned to be fixed in March as soon as I have any updates Iâll let you know.
In the latest version of GroupDocs.Viewer.UI, weâve resolved the issue related to printing documents in image mode.
Previously, we used direct links to the document pages. Now, weâre using the URL.createObjectURL()
method, which caches the pages and prevents them from being reloaded when the Print button is clicked. The printing process now works in three stages:
- Generates any pages that havenât been created yet
- Loads any pages that are not already cached
- Sends the document to print
Unfortunately, I wasnât able to reproduce the issue where some pages appear to be missing. Iâd appreciate your help in verifying whether the issue still exists on your side.
Additionally, I couldnât reproduce the Simple scroll issue either. Could you please share an animation or video demonstrating the problem so we can analyze it further?
See also v25.3 release notes for all the changes in this release.
Hi @vladimir.litvinchik
Thanks, I have updated to following version now,
image.png (16.2 KB)
Issue - some pages missing or blank/white.
Just investigated this appears to be when custom viewer paths has been set as follows, which was working in previous release (6.*).
Many 404s in debug console for various page urls. (get-thumb, get-page). looks like it still uses âviewer-apiâ instead âdocument-viewer-apiâ
https://localhost:5176/viewer-api/get-thumb?file=sample_pdf_printing_problem_1.pdf&page=28
https://localhost:5176/viewer-api/get-page?file=sample_pdf_printing_problem_1.pdf&page=234
endpoints.MapGroupDocsViewerUI(options =>
{
options.UIPath = "/document-viewer";
options.ApiEndpoint = "/document-viewer-api";
});
endpoints.MapGroupDocsViewerApi(options =>
{
options.ApiPath = "/document-viewer-api";
});
When I set this to it works and pages now loads without whitespace.
endpoints.MapGroupDocsViewerUI(options =>
{
options.UIPath = "/viewer";
options.ApiEndpoint = "/viewer-api";
});
endpoints.MapGroupDocsViewerApi(options =>
{
options.ApiPath = "/viewer-api";
});
Further observations to this new release. (after using /viewer)
- Print button doesnât work, nothing happens. no console logs or network calls/errors in browser console. (both on edge and chrome)
I have following settings in my viewer.
var builder = WebApplication.CreateBuilder(args);
builder
.Services
.AddGroupDocsViewerUI(options =>
{
options.EnableFileName = false;
options.EnablePresentation = false;
options.EnableHeader = false;
options.EnableFileBrowser = true;
options.EnableDownloadPdf = false;
options.EnableSearch = false;
options.EnableLanguageSelector = false;
options.EnableFileUpload = false;
options.PreloadPages = 300;
options.StaticContentMode = false;
options.EnablePrint = true;
options.RenderingMode = RenderingMode.Image;
});
builder.Services.AddControllersWithViews()
.AddRazorRuntimeCompilation()
.AddGroupDocsViewerSelfHostApi(options =>
{
options.SetViewerType(GroupDocs.Viewer.UI.Core.ViewerType.Jpg);
})
.AddLocalStorage("./Files")
.AddLocalCache("./Cache");
please try with above settings, if doesnât work, will try to create video. (although there might be some upload size restriction, i think on this forum)
Thank you for the feedback, Iâll look into this issues ASAP. Will update you when I have any information.