添加链接
注册
登录
link管理
链接快照平台
输入网页链接,自动生成快照
标签化管理网页链接
相关文章推荐
爱笑的草稿纸
·
苹果stream证书 - 一门APP文档
·
2 天前
·
追风的机器人
·
FCC's jQuery Ready ...
·
2 月前
·
聪明伶俐的脆皮肠
·
[BUG] ...
·
2 月前
·
有情有义的柠檬
·
R3-01小米路由器3开启SSH访问小强教程 ...
·
3 月前
·
瘦瘦的棒棒糖
·
《涼宮春日的消失》劇埸版靠著口碑相傳,在日本 ...
·
3 月前
·
link管理
›
syncfusion_flutter_pdfviewer | Flutter package
https://pub.dev/packages/syncfusion_flutter_pdfviewer
重感情的西装
10 月前
</noscript><div class="site-header"><button class="hamburger" aria-label="menu toggle"/><a class="logo" href="/"><img class="site-logo" src="/static/hash-bjrdsrlb/img/pub-dev-logo.svg" alt="" width="140" height="30" role="presentation"/></a><div class="site-header-space"/><div class="site-header-mask"/><div class="site-header-search"><form action="/packages" method="GET"><input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search"/></form></div><nav class="site-header-nav scroll-container"><div class="nav-login-container"><button id="-account-login" class="nav-main-button link">Sign in</button></div><div class="nav-container nav-help-container hoverable"><button class="nav-main-button">Help</button><div class="nav-hover-popup"><div class="nav-table-columns"><div class="nav-table-column"><h3>Pub.dev</h3><a class="nav-link" href="/help/search" rel="noopener" target="_blank">Searching for packages</a><a class="nav-link" href="/help/scoring" rel="noopener" target="_blank">Package scoring and pub points</a></div><div class="nav-table-column"><h3>Flutter</h3><a class="nav-link" href="https://flutter.dev/using-packages/" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://flutter.dev/developing-packages/" rel="noopener" target="_blank">Developing packages and plugins</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div><div class="nav-table-column"><h3>Dart</h3><a class="nav-link" href="https://dart.dev/guides/packages" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Pub.dev <img class="foldable-icon" src="/static/hash-bjrdsrlb/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="/help/search" rel="noopener" target="_blank">Searching for packages</a><a class="nav-link" href="/help/scoring" rel="noopener" target="_blank">Package scoring and pub points</a></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Flutter <img class="foldable-icon" src="/static/hash-bjrdsrlb/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="https://flutter.dev/using-packages/" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://flutter.dev/developing-packages/" rel="noopener" target="_blank">Developing packages and plugins</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Dart <img class="foldable-icon" src="/static/hash-bjrdsrlb/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="https://dart.dev/guides/packages" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div></nav></div><div id="banner-container"/><main class="container"><div class="detail-wrapper -active -has-info-box"><div class="detail-header -is-loose"><div class="detail-container"><div class="detail-header-outer-block"><div class="detail-header-content-block"><h1 class="title">syncfusion_flutter_pdfviewer 24.2.7 <span class="pkg-page-title-copy"><img class="pkg-page-title-copy-icon" src="/static/hash-bjrdsrlb/img/content-copy-icon.svg" alt="copy "syncfusion_flutter_pdfviewer: ^24.2.7" to clipboard" width="18" height="18" title="Copy "syncfusion_flutter_pdfviewer: ^24.2.7" to clipboard" data-copy-content="syncfusion_flutter_pdfviewer: ^24.2.7" data-ga-click-event="copy-package-version"/><div class="pkg-page-title-copy-feedback"><span class="code">syncfusion_flutter_pdfviewer: ^24.2.7</span> copied to clipboard</div></span></h1><div class="metadata">Published <span><a class="-x-ago" href="" title="Feb 20, 2024" aria-label="2 days ago" aria-role="button" role="button" data-timestamp="1708404284277">2 days ago</a></span> • <a class="-pub-publisher" href="/publishers/syncfusion.com"><img class="-pub-publisher-shield" src="/static/hash-bjrdsrlb/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>syncfusion.com</a><span class="package-badge" title="Package is compatible with Dart 3.">Dart 3 compatible</span></div><div class="detail-tags-and-like"><div class="detail-tags"><div class="-pub-tag-badge"><span class="tag-badge-main">SDK</span><a class="tag-badge-sub" href="/packages?q=sdk%3Aflutter" rel="nofollow" title="Packages compatible with Flutter SDK">Flutter</a></div><div class="-pub-tag-badge"><span class="tag-badge-main">Platform</span><a class="tag-badge-sub" href="/packages?q=platform%3Aandroid" rel="nofollow" title="Packages compatible with Android platform">Android</a><a class="tag-badge-sub" href="/packages?q=platform%3Aios" rel="nofollow" title="Packages compatible with iOS platform">iOS</a><a class="tag-badge-sub" href="/packages?q=platform%3Amacos" rel="nofollow" title="Packages compatible with macOS platform">macOS</a><a class="tag-badge-sub" href="/packages?q=platform%3Aweb" rel="nofollow" title="Packages compatible with Web platform">web</a><a class="tag-badge-sub" href="/packages?q=platform%3Awindows" rel="nofollow" title="Packages compatible with Windows platform">Windows</a></div></div><div class="detail-like"><button id="-pub-like-icon-button" class="mdc-icon-button" data-ga-click-event="toggle-like" aria-pressed="false" title="Like this package"><img class="mdc-icon-button__icon" src="/static/hash-bjrdsrlb/img/like-inactive.svg" alt="liked status: inactive" width="18" height="18"/><img class="mdc-icon-button__icon mdc-icon-button__icon--on" src="/static/hash-bjrdsrlb/img/like-active.svg" alt="liked status: active" width="18" height="18"/></button><span class="likes-count"><span id="likes-count">807</span></span></div></div></div></div></div></div><div class="detail-container"><div class="detail-lead"><div class="detail-metadata-toggle"><div class="detail-metadata-toggle-icon">→</div><h3 class="detail-lead-title">Metadata</h3></div><p class="detail-lead-text">Flutter PDF Viewer library is used to display a PDF document seamlessly and efficiently.</p><p class="detail-lead-more"><a class="detail-metadata-toggle">More...</a></p></div></div><div class="detail-body"><div class="detail-tabs"><div class="detail-tabs-wide-header"><div class="detail-container"><ul class="detail-tabs-header"><li class="detail-tab tab-button detail-tab-readme-title -active">Readme</li><li class="detail-tab tab-link detail-tab-changelog-title"><a href="/packages/syncfusion_flutter_pdfviewer/changelog" role="button">Changelog</a></li><li class="detail-tab tab-link detail-tab-example-title"><a href="/packages/syncfusion_flutter_pdfviewer/example" role="button">Example</a></li><li class="detail-tab tab-link detail-tab-installing-title"><a href="/packages/syncfusion_flutter_pdfviewer/install" role="button">Installing</a></li><li class="detail-tab tab-link detail-tab-versions-title"><a href="/packages/syncfusion_flutter_pdfviewer/versions" role="button">Versions</a></li><li class="detail-tab tab-link detail-tab-analysis-title"><a href="/packages/syncfusion_flutter_pdfviewer/score" role="button">Scores</a></li></ul></div></div><div class="detail-container detail-body-main"><div class="detail-tabs-content"><section class="tab-content detail-tab-readme-content -active markdown-body"><p><img src="https://cdn.syncfusion.com/content/images/pdfviewer-banner.png" alt="syncfusion_flutter_pdfviewer"/></p> <h1 class="hash-header" id="flutter-pdf-viewer-library">Flutter PDF Viewer library <a href="#flutter-pdf-viewer-library" class="hash-link">#</a></h1> <p>The Flutter PDF Viewer plugin lets you view PDF documents seamlessly and efficiently on the Android, iOS, Web, Windows, and macOS platforms. It has highly interactive and customizable features such as magnification, virtual bidirectional scrolling, page navigation, text selection, text search, page layout options, document link navigation, bookmark navigation, form filling, and reviewing with text markup annotations.</p> <p><strong>Disclaimer:</strong> This is a commercial package. To use this package, you need to have either a Syncfusion commercial license or <a href="https://www.syncfusion.com/products/communitylicense" rel="ugc">Free Syncfusion Community license</a>. For more details, please check the <a href="https://github.com/syncfusion/flutter-examples/blob/master/LICENSE" rel="ugc">LICENSE</a> file.</p> <h2 class="hash-header" id="table-of-contents">Table of contents <a href="#table-of-contents" class="hash-link">#</a></h2> <li><a href="#pdf-viewer-features">PDF Viewer features</a></li> <li><a href="#get-the-demo-application">Get the demo application</a></li> <li><a href="#other-useful-links">Useful links</a></li> <li><a href="#installation">Installation</a></li> <li><a href="#getting-started">Getting started</a> <li><a href="#add-pdf-viewer-to-the-widget-tree">Add PDF Viewer to the widget tree</a></li> <li><a href="#load-pdf-document-from-the-asset">Load PDF document from the Asset</a></li> <li><a href="#load-pdf-document-from-the-network">Load PDF document from the Network</a></li> <li><a href="#load-pdf-document-from-the-file">Load PDF document from the File</a></li> <li><a href="#load-pdf-document-from-the-memory">Load PDF document from the Memory</a></li> <li><a href="#load-encrypted-pdf-document">Load encrypted PDF document</a></li> <li><a href="#support-and-feedback">Support and feedback</a></li> <li><a href="#about-syncfusion">About Syncfusion</a></li> <h2 class="hash-header" id="pdf-viewer-features">PDF Viewer features <a href="#pdf-viewer-features" class="hash-link">#</a></h2> <p><strong>Virtual Scrolling</strong> - Easily scroll through the pages in the document with a fluent experience. The pages are rendered only when required to increase the loading and scrolling performance.</p> <p><strong>Magnification</strong> - The content of the document can be efficiently zoomed in and out.</p> <p><strong>Page Layout and Scroll Options</strong> - Layout the pages efficiently in a page by page (single page) scrolling mode or continuous scrolling mode. Also, scroll through pages in both horizontal and vertical direction.</p> <p><strong>Page navigation</strong> - Navigate to the desired pages instantly.</p> <p><strong>Text selection</strong> - Select text presented in a PDF document.</p> <p><strong>Text search</strong> - Search for text and navigate to all its occurrences in a PDF document instantly.</p> <p><strong>Bookmark navigation</strong> - Bookmarks saved in the document are loaded and made ready for easy navigation. This feature helps in navigation within the PDF document of the topics bookmarked already.</p> <p><strong>Document link annotation navigation</strong> - Navigate to the desired topic or position by tapping the document link annotation of the topics in the table of contents in a PDF document.</p> <p><strong>Hyperlink navigation</strong> - Detects hyperlinks, and tapping on the hyperlink will open the URL in a default web browser.</p> <p><strong>Text markup annotations</strong> - Add, remove, and modify text markup annotations in PDF files. The available text markups are highlight, underline, strikethrough and squiggly. This feature will help mark important passages, emphasize specific words or phrases, indicate that certain content should be removed or indicate that text contains possible errors.</p> <p><strong>Right to Left (RTL)</strong> - Change the user interface and functionalities such as text search and text copying to accommodate RTL languages such as Hebrew and Arabic.</p> <p><strong>Themes</strong> - Easily switch between the light and dark theme.</p> <p><strong>Localization</strong> - All static text within the PDF Viewer can be localized to any supported language.</p> <h2 class="hash-header" id="get-the-demo-application">Get the demo application <a href="#get-the-demo-application" class="hash-link">#</a></h2> <p>Explore the full capabilities of our Flutter widgets on your device by installing our sample browser applications from the below app stores, and view samples code in GitHub.</p> <h2 class="hash-header" id="other-useful-links">Other useful links <a href="#other-useful-links" class="hash-link">#</a></h2> <p>Take a look at the following to learn more about Syncfusion Flutter PDF Viewer:</p> <li><a href="https://www.syncfusion.com/flutter-widgets/flutter-pdf-viewer" rel="ugc">Syncfusion Flutter PDF Viewer product page</a></li> <li><a href="https://help.syncfusion.com/flutter/pdf-viewer/overview" rel="ugc">User guide documentation</a></li> <h2 class="hash-header" id="installation">Installation <a href="#installation" class="hash-link">#</a></h2> <p>Install the latest version from <a href="https://pub.dev/packages/syncfusion_flutter_pdfviewer/install">pub</a>.</p> <h2 class="hash-header" id="getting-started">Getting started <a href="#getting-started" class="hash-link">#</a></h2> <p>Import the following package.</p> <pre><code class="language-dart">import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart'; <h2 class="hash-header" id="add-pdf-viewer-to-the-widget-tree">Add PDF Viewer to the widget tree <a href="#add-pdf-viewer-to-the-widget-tree" class="hash-link">#</a></h2> <p>Add the <strong>SfPdfViewer</strong> widget as a child of any widget. Here, the <strong>SfPdfViewer</strong> widget is added as a child of the <strong>Container</strong> widget.</p> <pre><code class="language-dart">@override Widget build(BuildContext context) { return Scaffold( body: Container( child: SfPdfViewer.network( 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf'))); <h3 class="hash-header" id="web-integration">Web integration <a href="#web-integration" class="hash-link">#</a></h3> <p>We have used <a href="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.4.456/pdf.min.js" rel="ugc">PdfJs</a> for rendering the PDF page as an image on the web platform, so the script file must be referred to in your <code>web/index.html</code> file.</p> <p>On your <code>web/index.html</code> file, add the following <code>script</code> tags, somewhere in the <code>body</code> of the document:</p> <pre><code class="language-html"><script src="//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.11.338/pdf.min.js"></script> <script type="text/javascript"> pdfjsLib.GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.11.338/pdf.worker.min.js"; </script> <h2 class="hash-header" id="load-pdf-document-from-the-asset">Load PDF document from the Asset <a href="#load-pdf-document-from-the-asset" class="hash-link">#</a></h2> <p>The <a href="https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.asset.html">SfPdfViewer.asset</a> creates a widget that displays the PDF document obtained from an <a href="https://api.flutter.dev/flutter/services/AssetBundle-class.html">AssetBundle</a>.</p> <pre><code class="language-dart">@override Widget build(BuildContext context) { return Scaffold( body: SfPdfViewer.asset( 'assets/flutter-succinctly.pdf')); <h2 class="hash-header" id="load-pdf-document-from-the-network">Load PDF document from the Network <a href="#load-pdf-document-from-the-network" class="hash-link">#</a></h2> <p>The <a href="https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.network.html">SfPdfViewer.network</a> creates a widget that displays the PDF document obtained from a URL.</p> <pre><code class="language-dart">@override Widget build(BuildContext context) { return Scaffold( body: SfPdfViewer.network( 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf')); <h2 class="hash-header" id="load-pdf-document-from-the-file">Load PDF document from the File <a href="#load-pdf-document-from-the-file" class="hash-link">#</a></h2> <p>The <a href="https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.file.html">SfPdfViewer.file</a> creates a widget that displays the PDF document obtained from a <a href="https://api.flutter.dev/flutter/dart-io/File-class.html">File</a>.</p> <pre><code class="language-dart">@override Widget build(BuildContext context) { return Scaffold( body: SfPdfViewer.file( File('storage/emulated/0/Download/flutter-succinctly.pdf'))); <h2 class="hash-header" id="load-pdf-document-from-the-memory">Load PDF document from the Memory <a href="#load-pdf-document-from-the-memory" class="hash-link">#</a></h2> <p>The <a href="https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.memory.html">SfPdfViewer.memory</a> creates a widget that displays the PDF document obtained from the <a href="https://api.flutter.dev/flutter/dart-typed_data/Uint8List-class.html">Uint8List</a>.</p> <pre><code class="language-dart">@override Widget build(BuildContext context) { return Scaffold( body: SfPdfViewer.memory( bytes)); <h2 class="hash-header" id="load-encrypted-pdf-document">Load encrypted PDF document <a href="#load-encrypted-pdf-document" class="hash-link">#</a></h2> <p>Encrypted or password-protected document can be loaded in the <strong>SfPdfViewer</strong> widget by specifying the password in <a href="https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/password.html">password</a> property.</p> <pre><code class="language-dart">@override Widget build(BuildContext context) { return Scaffold( body: Container( child: SfPdfViewer.network( 'https://cdn.syncfusion.com/content/PDFViewer/encrypted.pdf', password: 'syncfusion'))); <h2 class="hash-header" id="support-and-feedback">Support and Feedback <a href="#support-and-feedback" class="hash-link">#</a></h2> <li>For any other queries, reach our <a href="https://support.syncfusion.com/support/tickets/create" rel="ugc">Syncfusion support team</a> or post the queries through the <a href="https://www.syncfusion.com/forums" rel="ugc">Community forums</a> and submit a feature request or a bug through our <a href="https://www.syncfusion.com/feedback/flutter" rel="ugc">Feedback portal</a>.</li>
推荐文章
爱笑的草稿纸
·
苹果stream证书 - 一门APP文档
2 天前
追风的机器人
·
FCC's jQuery Ready function syntax has been deprecated - The freeCodeCamp Forum
2 月前
聪明伶俐的脆皮肠
·
[BUG] docker-compose无法运行 · Issue #4 · PBH-BTN/PeerBanHelper · GitHub
2 月前
有情有义的柠檬
·
R3-01小米路由器3开启SSH访问小强教程_智能路由器论坛_ZNDS
3 月前
瘦瘦的棒棒糖
·
《涼宮春日的消失》劇埸版靠著口碑相傳,在日本締造票房奇蹟 - Wahouse和風家
3 月前