diff --git a/src/components/BootstrapBlazor.PdfViewer/BootstrapBlazor.PdfViewer.csproj b/src/components/BootstrapBlazor.PdfViewer/BootstrapBlazor.PdfViewer.csproj index eb120d22..d81ff390 100644 --- a/src/components/BootstrapBlazor.PdfViewer/BootstrapBlazor.PdfViewer.csproj +++ b/src/components/BootstrapBlazor.PdfViewer/BootstrapBlazor.PdfViewer.csproj @@ -1,7 +1,7 @@ - 9.0.5 + 9.0.6 diff --git a/src/components/BootstrapBlazor.PdfViewer/PdfViewer.razor.cs b/src/components/BootstrapBlazor.PdfViewer/PdfViewer.razor.cs index 9e1accca..d3b53e57 100644 --- a/src/components/BootstrapBlazor.PdfViewer/PdfViewer.razor.cs +++ b/src/components/BootstrapBlazor.PdfViewer/PdfViewer.razor.cs @@ -88,13 +88,13 @@ protected override async Task OnAfterRenderAsync(bool firstRender) private string GetAbsoluteUri(string? url) { - url ??= string.Empty; - if (string.IsNullOrEmpty(url) || !UseGoogleDocs) + if (string.IsNullOrEmpty(url)) { - return $"{url}#page={PageIndex}"; + return string.Empty; } + var uri = NavigationManager.ToAbsoluteUri(url); - return uri.AbsoluteUri; + return $"{uri.AbsoluteUri}#page={PageIndex}"; } ///