I encountered an issue when previewing a PDF file using GroupDocs.Viewer.
The problem appears to occur because the PDF contains an embedded subset font in Base64 format. The browser needs to decode the Base64 before the font can be used, which results in a brief flash of unstyled text.
Unfortunately I was not able to reproduce the flashing of the unstyled text. Here is what I did:
Took your GroupDocs Example.pdf (149.5 KB) document and rendered it to HTML with default settings (HtmlViewOptions.ForEmbeddedResources).
Opened produced HTML file in a Google Chrome, in the “Performance” tab of the Developer tools selected a CPU: 20x slowdown setting, and reloaded the page.
I was not able to observe flashing of unstyled text. At the first stage, browser draws the black horizontal table lines, and after a moment the final text appears.
Please share the HTML file, where you can observe such effects.
Also, I can suggest you to exclude fonts. Set the HtmlViewOptions.ExcludeFonts = true and re-generate HTML - all fonts will be excluded from the resultant HTML, and browser will use only the system fonts.
With best regards and waiting for your reply,
Denis Gvardionov
We have created the issue in our internal bug-tracker for further analysis. The issue ID for reference is VIEWERNET-5546.
For now, I can say that this is rather expected behavior due to the fact that the fonts have to be loaded and applied by a browser, but this is results in not the best user experience.
You would like to see a loader and a fully loaded page when all the resources are processed by a browser, is that correct?
Yes, that’s the expected result for my case — the loading screen should remain visible until all resources have been fully processed by the browser, so that unstyled text doesn’t flash on the screen.
For my reference, may I know approximately when this issue will be fixed?