Skip to content

Commit 84d42b5

Browse files
authored
feat(PdfReader): add ShowPrint parameter (#7191)
* feat(PdfReader): add OnDownloadAsync function * chore: updated version to 10.0.1-beta06 * feat(PdfReader): add ShowPrint parameter
1 parent 1786ad7 commit 84d42b5

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<PackageReference Include="BootstrapBlazor.OfficeViewer" Version="10.0.0" />
6363
<PackageReference Include="BootstrapBlazor.OnScreenKeyboard" Version="10.0.0" />
6464
<PackageReference Include="BootstrapBlazor.OpcDa" Version="10.0.0" />
65-
<PackageReference Include="BootstrapBlazor.PdfReader" Version="10.0.1-beta06" />
65+
<PackageReference Include="BootstrapBlazor.PdfReader" Version="10.0.1-beta07" />
6666
<PackageReference Include="BootstrapBlazor.PdfViewer" Version="10.0.0" />
6767
<PackageReference Include="BootstrapBlazor.Player" Version="10.0.1" />
6868
<PackageReference Include="BootstrapBlazor.RDKit" Version="10.0.0" />

src/BootstrapBlazor.Server/Components/Samples/PdfReaders.razor

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,27 @@
77
<PackageTips Name="BootstrapBlazor.PdfReader" />
88

99
<DemoBlock Title="@Localizer["PdfReaderNormalText"]" Introduction="@Localizer["PdfReaderNormalIntro"]" Name="Normal">
10-
<section ignore class="row form-inline g3">
10+
<section ignore class="row form-inline g-3" style="--bb-input-group-label-width: 176px;">
11+
<div class="col-12 col-sm-6">
12+
<BootstrapInputGroup>
13+
<BootstrapInputGroupLabel>ShowDownload</BootstrapInputGroupLabel>
14+
<Switch @bind-Value="_showDownload"></Switch>
15+
</BootstrapInputGroup>
16+
</div>
17+
<div class="col-12 col-sm-6">
18+
<BootstrapInputGroup>
19+
<BootstrapInputGroupLabel>ShowPrint</BootstrapInputGroupLabel>
20+
<Switch @bind-Value="_showPrint"></Switch>
21+
</BootstrapInputGroup>
22+
</div>
1123
<div class="col-12 col-sm-6">
1224
<BootstrapInputGroup>
1325
<BootstrapInputGroupLabel>ShowTwoPagesOneView</BootstrapInputGroupLabel>
14-
<Switch @bind-Value="_showTwoPagesOneViewButton"></Switch>
26+
<Switch @bind-Value="_showTwoPagesOneView"></Switch>
1527
</BootstrapInputGroup>
1628
</div>
1729
</section>
18-
<PdfReader Url="@_url" ShowTwoPagesOneViewButton="_showTwoPagesOneViewButton" ViewHeight="600px" OnDownloadAsync="OnDownloadAsync"></PdfReader>
30+
<PdfReader Url="@_url" ShowTwoPagesOneView="_showTwoPagesOneView"
31+
ShowDownload="_showDownload" ShowPrint="_showPrint"
32+
ViewHeight="600px" OnDownloadAsync="OnDownloadAsync"></PdfReader>
1933
</DemoBlock>

src/BootstrapBlazor.Server/Components/Samples/PdfReaders.razor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ public partial class PdfReaders
2727
[NotNull]
2828
PdfReader? PdfReader { get; set; }
2929

30-
private bool _showTwoPagesOneViewButton = true;
30+
private bool _showTwoPagesOneView = true;
31+
private bool _showPrint = true;
32+
private bool _showDownload = true;
3133
private string _url = "./samples/sample.pdf";
3234

3335
private async Task OnDownloadAsync()

0 commit comments

Comments
 (0)