Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<PackageReference Include="BootstrapBlazor.OfficeViewer" Version="10.0.0" />
<PackageReference Include="BootstrapBlazor.OnScreenKeyboard" Version="10.0.0" />
<PackageReference Include="BootstrapBlazor.OpcDa" Version="10.0.0" />
<PackageReference Include="BootstrapBlazor.PdfReader" Version="10.0.23" />
<PackageReference Include="BootstrapBlazor.PdfReader" Version="10.0.24" />
<PackageReference Include="BootstrapBlazor.PdfViewer" Version="10.0.0" />
<PackageReference Include="BootstrapBlazor.Player" Version="10.0.1" />
<PackageReference Include="BootstrapBlazor.RDKit" Version="10.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
<Switch @bind-Value="_showToolbar"></Switch>
</BootstrapInputGroup>
</div>
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel>ShowFileName</BootstrapInputGroupLabel>
<Switch @bind-Value="_showFileName"></Switch>
</BootstrapInputGroup>
</div>
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel>ShowDownload</BootstrapInputGroupLabel>
Expand Down Expand Up @@ -53,6 +59,6 @@
</section>
<PdfReader Url="@_url" EnableThumbnails="_enableThumbnails"
ShowTwoPagesOneView="_showTwoPagesOneView" ShowDownload="_showDownload"
ShowToolbar="_showToolbar" ShowPrint="_showPrint"
ShowToolbar="_showToolbar" ShowPrint="_showPrint" ShowFileName="_showFileName"
Comment on lines 60 to +62
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The boolean parameters passed to the PdfReader component are missing the @ symbol. In Blazor, when passing variable values as component parameters, you need to use @ to indicate it's a C# expression rather than a string literal. Without @, these parameters are being passed as the literal strings "_enableThumbnails", "_showTwoPagesOneView", etc., instead of the actual boolean values.

All boolean parameters on lines 60-62 need to be corrected:

  • EnableThumbnails should be EnableThumbnails="@_enableThumbnails"
  • ShowTwoPagesOneView should be ShowTwoPagesOneView="@_showTwoPagesOneView"
  • ShowDownload should be ShowDownload="@_showDownload"
  • ShowToolbar should be ShowToolbar="@_showToolbar"
  • ShowPrint should be ShowPrint="@_showPrint"
  • ShowFileName should be ShowFileName="@_showFileName"

This is a pre-existing issue affecting all parameters except Url, but it should be fixed as part of this PR since you're already modifying this line.

Copilot uses AI. Check for mistakes.
ViewHeight="600px" OnGetStreamAsync="OnGetStreamAsync"></PdfReader>
</DemoBlock>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public partial class PdfReaders
private bool _enableThumbnails = true;
private bool _showDownload = true;
private bool _showToolbar = true;
private bool _showFileName = true;
private string _url = "./samples/sample.pdf";
private string _streamFileName = "";

Expand Down
Loading