Cannot preview document on iOS
Problem reported by Varian - 8/25/2025 at 12:05 AM
Resolved
The document cannot be loaded. nly the toolbar appears, and no document is loaded. The error log is PROMISE_REJECTED: Error: The `container` must be absolutely positioned.

We're using iOS 18.5 and Gleamtech Document Ultimate 7.5.9.0.

Cem Alacayir Replied
Employee Post
Ok this should now be fixed:

Version 7.7.0 - August 26, 2025

  • Fixed: Avoid The `container` must be absolutely positioned. error in revisited Viewer pages on iOS Safari.

Varian Replied
Hi Cem, 

We still got the same error after updated to version 7.7.0
Cem Alacayir Replied
Employee Post
Cannot replicate the error. Update to the latest version, 7.7.0 is now old.
If you still get the error, I need to see your code. For example are you doing anything in client-side events? Are you manipulating viewer's iframe in any way? This iframe is normally isolated but maybe you change dom from outside?
Varian Replied
We tried on the mobile Safari browser. This issue is intermittent — we tested it 20 times, and it failed to preview twice to three times. We also have a video showing one of the three failed attempts to preview the PDF. We don't manipulating viewer's iframe in anywhere  and no change dom from outside.

Here is our setting on dotnet:
 var documentViewer = new DocumentViewer()
 {
     Width = CssLength.Percentage(100),
     Height = CssLength.Pixel(Request.Browser.ScreenPixelsHeight * 2),
     Document = new StreamFileProvider(fileStream.FileName, fileStream.FileStream, DateTime.Now, fileStream.FileStream.Length),
     DocumentOptions = documentOptions,
     ToolbarVisible = pToolbarVisible,
     SidebarVisible = pToolbarVisible,
     SidebarView = DocumentViewerSidebarView.Thumbs,
     RememberViewHistory = false,
     VerticalToolbarVisible = false,
 };

here is our html code
@using GleamTech.AspNet.Mvc
@using GleamTech.DocumentUltimate.AspNet.UI
@using GleamTech.AspNet.UI;

@model DocumentViewer

<script>
</script>

<!DOCTYPE html>

@{
    DocumentViewer documentViewer = Model;
    documentViewer.Height = CssLength.Percentage(100);
}

<html>
<head>
    @this.RenderHead(documentViewer)
</head>
<body>
    @this.RenderBody(documentViewer)
</body>
</html>

Cem Alacayir Replied
Employee Post
Did you test also with latest v7.7.6 (we expecially have some viewer rendering updates in v7.7.1 and v7.7.2) ?

If still error, try putting something in your HTML page, that changes (even if doc is the same), thus busts page caching:

<!-- @DateTime.Now -->
Cem Alacayir Replied
Employee Post Marked As Resolution
Ok, we have a new release which I think will fix your issue, Version 7.8.0 - October 20, 2025:
  • Fixed: When creating multiple instances of viewer in the same page
    webviewerloaded event was being registered multiple times thus causing errors.
    This may be the root cause of unreplicated error: The `container` must be absolutely positioned..
    The viewer id was being unnecessarily incremented even if it did not exist in the document.
    Track viewer id internally as user may re-assign the window global variable.

Reply to Thread

Enter the verification text