|
7 | 7 | <PackageTips Name="BootstrapBlazor.PdfReader" /> |
8 | 8 |
|
9 | 9 | <DemoBlock Title="@Localizer["PdfReaderNormalText"]" Introduction="@Localizer["PdfReaderNormalIntro"]" Name="Normal"> |
10 | | - <PdfReader Options="_options"></PdfReader> |
11 | | -</DemoBlock> |
12 | | - |
13 | | -@* <DemoBlock Title="@Localizer["PdfReaderStreamModeText"]" Introduction="@Localizer["PdfReaderStreamModeIntro"]" Name="StreamMode"> |
14 | | - <div> |
15 | | - <div class="row g-3"> |
16 | | - <div class="col-12"> |
17 | | - <BootstrapInputGroup> |
18 | | - <BootstrapInput @bind-Value="@FilenameStream" /> |
19 | | - <Button Color="Color.Primary" OnClick="ApplyFilenameStream">Go!</Button> |
20 | | - </BootstrapInputGroup> |
21 | | - </div> |
| 10 | + <section ignore class="row form-inline g3"> |
| 11 | + <div class="col-12 col-sm-6"> |
| 12 | + <BootstrapInputGroup> |
| 13 | + <BootstrapInputGroupLabel>ShowTwoPagesOnView</BootstrapInputGroupLabel> |
| 14 | + <Switch @bind-Value="_options.ShowTwoPagesOnViewButton"></Switch> |
| 15 | + </BootstrapInputGroup> |
22 | 16 | </div> |
23 | | - <PdfReader @ref="PdfReader" FileName="@FilenameStream" StreamMode="true" Height="500px" /> |
24 | | - </div> |
| 17 | + </section> |
| 18 | + <PdfReader Options="_options"></PdfReader> |
25 | 19 | </DemoBlock> |
26 | | -
|
27 | | -<DemoBlock Title="@Localizer["PdfReaderCompatibilityModeText"]" Introduction="@Localizer["PdfReaderCompatibilityModeIntro"]" Name="CompatibilityMode"> |
28 | | - <Tips> |
29 | | - <div>@((MarkupString)Localizer["PdfReaderCompatibilityModeTips"].Value)</div> |
30 | | - </Tips> |
31 | | -
|
32 | | - <h6>CompatibilityMode</h6> |
33 | | - <h6>CompatibilityMode</h6> |
34 | | - <PdfReader FileName=@FileName CompatibilityMode Height="300px" /> |
35 | | -
|
36 | | - <h6>CompatibilityNoneES5</h6> |
37 | | - <PdfReader FileName=@FileName CompatibilityNoneES5 Height="300px" /> |
38 | | - </DemoBlock> |
39 | | -
|
40 | | - <DemoBlock Title="@Localizer["PdfReaderAdvancedText"]" Introduction="@Localizer["PdfReaderAdvancedIntro"]" Name="Advanced"> |
41 | | - <div> |
42 | | - <div class="row mb-3"> |
43 | | - <div class="col-12"> |
44 | | - <BootstrapInputGroup> |
45 | | - <Button Color="Color.Primary" OnClick="ApplyZoom">@Localizer["PdfReaderAdvancedViewMode"]</Button> |
46 | | - <Button Color="Color.Primary" OnClick="ApplyPageMode">@Localizer["PdfReaderAdvancedPageMode"]</Button> |
47 | | - <Button Color="Color.Primary" OnClick="ApplyPagePrevious">@Localizer["PdfReaderAdvancedPagePrevious"]</Button> |
48 | | - <Button Color="Color.Primary" OnClick="ApplyPageNext">@Localizer["PdfReaderAdvancedPageNext"]</Button> |
49 | | - <BootstrapInput @bind-Value="@Page" /> |
50 | | - <Button OnClick="ApplyPage">@Localizer["PdfReaderAdvancedGoToPage"]</Button> |
51 | | - </BootstrapInputGroup> |
52 | | - </div> |
53 | | - </div> |
54 | | - <div class="row mb-3"> |
55 | | - <div class="col-12"> |
56 | | - <BootstrapInputGroup> |
57 | | - <BootstrapInputGroupLabel @bind-Value="@Search" DisplayText="@Localizer["PdfReaderAdvancedSearchLabel"]" /> |
58 | | - <BootstrapInput @bind-Value="@Search" OnEnterAsync="_ => ApplySearch()" OnEscAsync="_ => Clear()" /> |
59 | | - <Button Icon="fa-solid fa-magnifying-glass" OnClick="ApplySearch"></Button> |
60 | | - </BootstrapInputGroup> |
61 | | - </div> |
62 | | - </div> |
63 | | - <div class="row mb-3"> |
64 | | - <div class="col-12"> |
65 | | - <BootstrapInputGroup> |
66 | | - <BootstrapInputGroupLabel @bind-Value="@Filename" DisplayText="@Localizer["PdfReaderAdvancedFilenameLabel"]" /> |
67 | | - <BootstrapInput @bind-Value="@Filename" /> |
68 | | - <Button Color="Color.Primary" OnClick="ApplySearch">@Localizer["PdfReaderAdvancedRefreshPage"]</Button> |
69 | | - </BootstrapInputGroup> |
70 | | - </div> |
71 | | - </div> |
72 | | - <div class="row mb-3 form-inline"> |
73 | | - <div class="col-6 col-sm-4 col-md-3 col-lg-auto"> |
74 | | - <Switch @bind-Value="@StreamMode" ShowLabel="true" DisplayText="@Localizer["PdfReaderAdvancedStreamModeLabel"]" /> |
75 | | - </div> |
76 | | - <div class="col-6 col-sm-4 col-md-3 col-lg-auto"> |
77 | | - <Switch @bind-Value="@ReadOnly" ShowLabel="true" DisplayText="@Localizer["PdfReaderAdvancedReadOnlyLabel"]" ShowLabelTooltip="true" OnValueChanged="_ => ApplySearch()" /> |
78 | | - </div> |
79 | | - <BootstrapInput @bind-Value="@Watermark" DisplayText="@Localizer["PdfReaderAdvancedWatermarkLabel"]" /> |
80 | | - </div> |
81 | | -
|
82 | | - <PdfReader @ref="AdvancedPdfReader" |
83 | | - FileName="@(StreamMode?FilenameStream:Filename)" |
84 | | - StreamMode="StreamMode" |
85 | | - Page=@Page |
86 | | - Zoom=@Zoom |
87 | | - Pagemode=@PageMode |
88 | | - Search=@Search |
89 | | - Width="80%" |
90 | | - Height="500px" /> |
91 | | - </div> |
92 | | - </DemoBlock> |
93 | | -
|
94 | | - <AttributeTable Items="@GetAttributes()" /> |
95 | | -
|
96 | | - <a href="https://gitee.com/LongbowEnterprise/BootstrapBlazor/issues/I66LXV">@Localizer["PdfReaderIssue"]</a> *@ |
0 commit comments