File tree Expand file tree Collapse file tree 5 files changed +17
-4
lines changed
src/BootstrapBlazor.Server Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 5858 <PackageReference Include =" BootstrapBlazor.OctIcon" Version =" 9.0.4" />
5959 <PackageReference Include =" BootstrapBlazor.OnScreenKeyboard" Version =" 9.0.1" />
6060 <PackageReference Include =" BootstrapBlazor.PdfReader" Version =" 9.0.1" />
61- <PackageReference Include =" BootstrapBlazor.PdfViewer" Version =" 9.0.0 " />
61+ <PackageReference Include =" BootstrapBlazor.PdfViewer" Version =" 9.0.1 " />
6262 <PackageReference Include =" BootstrapBlazor.Player" Version =" 9.0.1" />
6363 <PackageReference Include =" BootstrapBlazor.RDKit" Version =" 9.0.2" />
6464 <PackageReference Include =" BootstrapBlazor.SignaturePad" Version =" 9.0.1" />
Original file line number Diff line number Diff line change 88<PackageTips Name =" BootstrapBlazor.PdfViewer" />
99
1010<DemoBlock Title =" @Localizer[" PdfViewerNormalTitle " ]" Introduction =" @Localizer[" PdfViewerNormalIntro " ]" Name =" Normal" >
11+ <section ignore >
12+ <div class =" row g-3" >
13+ <div class =" col-12 col-sm-6" >
14+ <BootstrapInputGroup >
15+ <BootstrapInputGroupLabel DisplayText =" UseGoogleDocs" ></BootstrapInputGroupLabel >
16+ <Switch @bind-Value =" @_useGoogleDocs" ></Switch >
17+ </BootstrapInputGroup >
18+ </div >
19+ </div >
20+ </section >
1121 <PdfViewer Url =" ./samples/pdf-viewer.pdf" Height =" 620px"
12- NotSupportCallback =" NotSupportCallback" OnLoaded =" OnLoaded" ></PdfViewer >
22+ NotSupportCallback =" NotSupportCallback" OnLoaded =" OnLoaded"
23+ UseGoogleDocs =" @_useGoogleDocs" ></PdfViewer >
1324</DemoBlock >
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ public partial class PdfViewers
1515 [ Inject , NotNull ]
1616 private ToastService ? ToastService { get ; set ; }
1717
18+ private bool _useGoogleDocs = true ;
19+
1820 private Task OnLoaded ( ) => ToastService . Success ( "Pdf Viewer" , Localizer [ "PdfViewerToastSuccessfulContent" ] ) ;
1921
2022 private Task NotSupportCallback ( ) => ToastService . Error ( "PdfViewer" , Localizer [ "PdfViewerToastNotSupportContent" ] ) ;
Original file line number Diff line number Diff line change 61616161 "PdfViewerTitle": "PDFViewer",
61626162 "PdfViewerDescription": "Open the PDF file in the component to read its contents",
61636163 "PdfViewerNormalTitle": "Basic usage",
6164- "PdfViewerNormalIntro": "Load a PDF file by setting the <code>Url</code> parameter",
6164+ "PdfViewerNormalIntro": "Load a PDF file by setting the <code>Url</code> parameter. Set <code>UseGoogleDocs</code> to use docs.google.com preview ",
61656165 "PdfViewerToastSuccessfulContent": "PDF document loaded successfully.",
61666166 "PdfViewerToastNotSupportContent": "The browser does not support inline viewing of PDF files."
61676167 },
Original file line number Diff line number Diff line change 61616161 "PdfViewerTitle": "PDFViewer PDF 阅读器",
61626162 "PdfViewerDescription": "在组件中打开 Pdf 文件阅读其内容",
61636163 "PdfViewerNormalTitle": "基础用法",
6164- "PdfViewerNormalIntro": "通过设置 <code>Url</code> 参数加载 Pdf 文件",
6164+ "PdfViewerNormalIntro": "通过设置 <code>Url</code> 参数加载 Pdf 文件,设置 <code>UseGoogleDocs</code> 使用 docs.google.com 预览 ",
61656165 "PdfViewerToastSuccessfulContent": "PDF 文档加载成功",
61666166 "PdfViewerToastNotSupportContent": "当前浏览器不支持 Pdf 文档预览功能"
61676167 },
You can’t perform that action at this time.
0 commit comments