From 54d22e10990058c4ceaef6d1bb86a50a1fe27328 Mon Sep 17 00:00:00 2001 From: immankumarsync Date: Tue, 3 Jun 2025 11:27:37 +0530 Subject: [PATCH 1/2] FLUT-959344: Check grammar for Flutter PDF viewer files --- ...natures-to-Syncfusion-Flutter-PdfViewer.md | 36 ++-- ...t-loaded-rpath-libswiftCore-dylib-error.md | 8 +- .../How-to/custom-widget-on-flutterflow.md | 44 ++--- Flutter/pdf-viewer/accessibility.md | 48 +++-- .../add-remove-modify-annotations.md | 20 +- Flutter/pdf-viewer/annotation-collection.md | 2 +- Flutter/pdf-viewer/annotations-overview.md | 16 +- Flutter/pdf-viewer/bookmark-navigation.md | 16 +- .../pdf-viewer/document-link-annotation.md | 6 +- Flutter/pdf-viewer/document-load-callbacks.md | 8 +- Flutter/pdf-viewer/form-filling.md | 52 +++--- Flutter/pdf-viewer/gesture-callbacks.md | 10 +- Flutter/pdf-viewer/getting-started.md | 26 +-- Flutter/pdf-viewer/hyperlink-navigation.md | 8 +- Flutter/pdf-viewer/interaction-modes.md | 14 +- Flutter/pdf-viewer/localization.md | 2 +- Flutter/pdf-viewer/lock-unlock-annotations.md | 12 +- Flutter/pdf-viewer/magnification.md | 18 +- .../pdf-viewer/open-a-document-from-base64.md | 1 - .../pdf-viewer/open-a-document-from-url.md | 15 +- Flutter/pdf-viewer/open-a-document.md | 20 +- Flutter/pdf-viewer/overview.md | 22 +-- .../page-layout-and-scroll-direction.md | 24 +-- Flutter/pdf-viewer/page-navigation.md | 16 +- Flutter/pdf-viewer/right-to-left.md | 16 +- Flutter/pdf-viewer/scrolling.md | 13 +- .../pdf-viewer/select-deselect-annotations.md | 28 ++- Flutter/pdf-viewer/sticky-notes.md | 28 +-- Flutter/pdf-viewer/text-markup.md | 43 +++-- Flutter/pdf-viewer/text-search.md | 42 ++--- Flutter/pdf-viewer/text-selection.md | 26 +-- Flutter/pdf-viewer/ui-customization.md | 176 +++++++++--------- Flutter/pdf-viewer/undo-redo.md | 4 +- .../viewing-password-protected-pdf-files.md | 15 +- 34 files changed, 412 insertions(+), 423 deletions(-) diff --git a/Flutter/pdf-viewer/How-to/Add-SignaturePad-signatures-to-Syncfusion-Flutter-PdfViewer.md b/Flutter/pdf-viewer/How-to/Add-SignaturePad-signatures-to-Syncfusion-Flutter-PdfViewer.md index c59f38632..0b4c8b8c8 100644 --- a/Flutter/pdf-viewer/How-to/Add-SignaturePad-signatures-to-Syncfusion-Flutter-PdfViewer.md +++ b/Flutter/pdf-viewer/How-to/Add-SignaturePad-signatures-to-Syncfusion-Flutter-PdfViewer.md @@ -7,11 +7,11 @@ control: SfPdfViewer documentation: ug --- -# How to add a digital signature in SfPdfViewer using SfSignaturePad? +# How to Add a Digital Signature in SfPdfViewer Using SfSignaturePad? -In this example, we have added the signature drawn on [SfSignaturePad](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad-class.html) to the document in [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) with the help of [Syncfusion® PDF Library](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/pdf-library.html#classes). +In this example, we have added the signature drawn on the [SfSignaturePad](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad-class.html) to the document in [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) with the help of the [Syncfusion® PDF Library](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/pdf-library.html#classes). -In the `_handleSigningProcess()` method, the signature in SfSignaturePad is saved as image using the [toImage()](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toImage.html) method. Created a [PdfSignatureField()](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfSignatureField-class.html) and added the signature image as digital signature in the PDF document using the [drawImage()](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfGraphics/drawImage.html) method in [Syncfusion® PDF Library](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/pdf-library.html#classes) and then save the document as bytes. Loaded the saved document bytes using the [SfPdfViewer.memory()](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.memory.html). The following code example explains the same. +In the `_handleSigningProcess()` method, the signature in the SfSignaturePad is saved as an image using the [toImage()](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toImage.html) method. A [PdfSignatureField()](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfSignatureField-class.html) is created, and the signature image is added as a digital signature in the PDF document using the [drawImage()](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfGraphics/drawImage.html) method in the [Syncfusion® PDF Library](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/pdf-library.html#classes), then saving the document as bytes. The saved document bytes are loaded using the [SfPdfViewer.memory()](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.memory.html). The following code example explains the same. {% tabs %} {% highlight Dart %} @@ -61,9 +61,9 @@ class _MyHomePageState extends State<_MyHomePage> { setState(() {}); } - //Add the signature in the PDF document. + // Add the signature in the PDF document. void _handleSigningProcess() async { - //Save the signature as PNG image. + // Save the signature as a PNG image. final data = await _signaturePadGlobalKey.currentState!.toImage(pixelRatio: 3.0); final bytes = await data.toByteData(format: ui.ImageByteFormat.png); @@ -72,32 +72,32 @@ class _MyHomePageState extends State<_MyHomePage> { ByteData certBytes = await rootBundle.load("assets/certificate.pfx"); final Uint8List certificateBytes = certBytes.buffer.asUint8List(); - //Load the document + // Load the document PdfDocument document = PdfDocument(inputBytes: documentBytes); - //Get the first page of the document. The page in which signature need to be added. + // Get the first page of the document. The page where the signature needs to be added. PdfPage page = document.pages[0]; - //Create a digital signature and set the signature information. + // Create a digital signature and set the signature information. PdfSignatureField signatureField = PdfSignatureField(page, 'signature', bounds: const Rect.fromLTRB(300, 500, 550, 700), signature: PdfSignature( - //Create a certificate instance from the PFX file with a private key. + // Create a certificate instance from the PFX file with a private key. certificate: PdfCertificate(certificateBytes, 'password123'), contactInfo: 'johndoe@owned.us', locationInfo: 'Honolulu, Hawaii', - reason: 'I am author of this document.', + reason: 'I am the author of this document.', digestAlgorithm: DigestAlgorithm.sha256, cryptographicStandard: CryptographicStandard.cms)); - //Get the signature field appearance graphics. + // Get the signature field appearance graphics. PdfGraphics? graphics = signatureField.appearance.normal.graphics; - //Draw the signature image in the PDF page. + // Draw the signature image on the PDF page. graphics?.drawImage(PdfBitmap(bytes!.buffer.asUint8List()), const Rect.fromLTWH(0, 0, 250, 200)); - //Add a signature field to the form. + // Add a signature field to the form. document.form.fields.add(signatureField); _documentBytes = Uint8List.fromList(document.saveSync()); @@ -105,7 +105,7 @@ class _MyHomePageState extends State<_MyHomePage> { setState(() {}); } - //Clear the signature in the SfSignaturePad. + // Clear the signature in the SfSignaturePad. void _handleClearButtonPressed() { _signaturePadGlobalKey.currentState!.clear(); } @@ -114,7 +114,7 @@ class _MyHomePageState extends State<_MyHomePage> { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text('PDF Viewer with Signature pad'), + title: const Text('PDF Viewer with Signature Pad'), ), body: Column( children: [ @@ -154,7 +154,7 @@ class _MyHomePageState extends State<_MyHomePage> { child: ElevatedButton( onPressed: _handleSigningProcess, child: - const Text('Add signature and load the document'), + const Text('Add Signature and Load the Document'), ), ), ElevatedButton( @@ -174,6 +174,6 @@ class _MyHomePageState extends State<_MyHomePage> { {% endhighlight %} {% endtabs %} -![PDF Viewer with Signature pad](images/pdfviewer-with-signaturepad.jpg) +![PDF Viewer with Signature Pad](images/pdfviewer-with-signaturepad.jpg) -To know more about adding a digital signature to a PDF document, please refer [here](https://help.syncfusion.com/flutter/pdf/working-with-digital-signature). +To learn more about adding a digital signature to a PDF document, please refer [here](https://help.syncfusion.com/flutter/pdf/working-with-digital-signature). \ No newline at end of file diff --git a/Flutter/pdf-viewer/How-to/Resolve-Library-not-loaded-rpath-libswiftCore-dylib-error.md b/Flutter/pdf-viewer/How-to/Resolve-Library-not-loaded-rpath-libswiftCore-dylib-error.md index 464db1d74..19ecb805e 100644 --- a/Flutter/pdf-viewer/How-to/Resolve-Library-not-loaded-rpath-libswiftCore-dylib-error.md +++ b/Flutter/pdf-viewer/How-to/Resolve-Library-not-loaded-rpath-libswiftCore-dylib-error.md @@ -7,12 +7,12 @@ control: SfPdfViewer documentation: ug --- -# How to resolve "Library not loaded: @rpath/libswiftCore.dylib" error? +# How to Resolve "Library not loaded: @rpath/libswiftCore.dylib" Error? -The Syncfusion® Flutter PDF Viewer is a [FFI plugin](https://docs.flutter.dev/packages-and-plugins/developing-packages#types) that uses native code to render the PDF pages. **Java** code is used for **Android**, and **Swift** code is used for **iOS and macOS**. To run the Swift code, the runtime requires the essential Swift standard libraries present in the Runpath **“usr/lib/swift.”** If this path is missing from the **Runpath Search Paths** of the project build settings, you will face the error **"Library not loaded: @rpath/libswiftCore.dylib."** +The Syncfusion® Flutter PDF Viewer is an [FFI plugin](https://docs.flutter.dev/packages-and-plugins/developing-packages#types) that uses native code to render the PDF pages. **Java** code is used for **Android**, and **Swift** code is used for **iOS and macOS**. To run the Swift code, the runtime requires the essential Swift standard libraries present in the Runpath **“usr/lib/swift.”** If this path is missing from the **Runpath Search Paths** of the project build settings, you will face the error **"Library not loaded: @rpath/libswiftCore.dylib."** -Usually, the **"usr/lib/swift"** path will be added automatically to the **Runpath Search Paths** when you add the Syncfusion® Flutter PDF Viewer (SfPdfViewer) package and build the application. But in some cases, due to the machine-specific environment, this path doesn't get added, and so this issue occurs. +Usually, the **"usr/lib/swift"** path will be added automatically to the **Runpath Search Paths** when you add the Syncfusion® Flutter PDF Viewer (SfPdfViewer) package and build the application. But in some cases, due to the machine-specific environment, this path doesn't get added, and so this issue occurs. -To overcome this issue, you are suggested to add the **"usr/lib/swift"** path to the **Runpath Search Paths** manually in the project build settings. Find and edit the **Runpath Search Paths** option by opening the project in the **XCode** and then going to **Build Settings -> Linking -> Runpath Search Paths**. Please find the Runpath search path option screenshot in the following project build settings. +To overcome this issue, you are suggested to add the **"usr/lib/swift"** path to the **Runpath Search Paths** manually in the project build settings. Find and edit the **Runpath Search Paths** option by opening the project in **XCode** and then going to **Build Settings -> Linking -> Runpath Search Paths**. Please find the Runpath search path option screenshot in the following project build settings. ![XCode Runpath Search Paths](images/xcode-runpath-search-paths.jpg) \ No newline at end of file diff --git a/Flutter/pdf-viewer/How-to/custom-widget-on-flutterflow.md b/Flutter/pdf-viewer/How-to/custom-widget-on-flutterflow.md index a53a31812..9ff575b0f 100644 --- a/Flutter/pdf-viewer/How-to/custom-widget-on-flutterflow.md +++ b/Flutter/pdf-viewer/How-to/custom-widget-on-flutterflow.md @@ -8,19 +8,19 @@ documentation: ug keywords: flutter pdf viewer, flutter view pdf, pdf viewer in flutter, flutter open pdf, flutter pdf view --- -# How to add Syncfusion® PDF Viewer widget in FlutterFlow? +# How to Add Syncfusion® PDF Viewer Widget in FlutterFlow? ## Overview -[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive amounts of code. Additionally, it offers the capability to include custom widgets that are not included in the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate our SfPdfViewer widget as a custom widget in [FlutterFlow](https://app.flutterflow.io/dashboard). +[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive amounts of code. Additionally, it offers the capability to include custom widgets that are not included in the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate the SfPdfViewer widget as a custom widget in [FlutterFlow](https://app.flutterflow.io/dashboard). -### Create a new project +### Create a New Project Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) and click the `+ Create New` button to create a new project. -### Creating the custom widget +### Creating the Custom Widget -1. Navigate to the `Custom Code` section in the left side navigation menu. +1. Navigate to the `Custom Code` section in the left-side navigation menu. 2. Click on the `+ Add` button to open a dropdown menu, then select `Widget`. 3. Update the widget name as desired. 4. Click the `View Boilerplate Code` button on the right side, represented by this icon `[]`. @@ -29,14 +29,14 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an ![Custom Widget](images/custom-widget.png) -### Add PDF Viewer widget as a dependency +### Add PDF Viewer Widget as a Dependency 1. Click on `+ Add Dependency`, a text editor will appear. -2. Navigate to [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) in [pub.dev](https://pub.dev/) and copy the dependency name and version using the `Copy to Clipboard` option. +2. Navigate to [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) on [pub.dev](https://pub.dev/) and copy the dependency name and version using the `Copy to Clipboard` option. ![Version](images/copy-version.png) -3. Paste the copied dependency into the text editor, then click `Refresh` and `Save` it. +3. Paste the copied dependency into the text editor, then click `Refresh` and `Save`. ->**Note**: The live version of [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) has been migrated to the latest version of Flutter SDK. To ensure compatibility, check [FlutterFlow](https://app.flutterflow.io/dashboard)'s current Flutter version and obtain the corresponding version of [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) by referring to the [SDK compatibility](https://help.syncfusion.com/flutter/system-requirements#sdk-version-compatibility). +>**Note**: The live version of [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) has been migrated to the latest version of the Flutter SDK. To ensure compatibility, check [FlutterFlow](https://app.flutterflow.io/dashboard)'s current Flutter version and obtain the corresponding version of [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) by referring to the [SDK compatibility](https://help.syncfusion.com/flutter/system-requirements#sdk-version-compatibility). ![Dependency](images/dependency.png) @@ -44,21 +44,21 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an >**Note**: Since [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) depends on the [Syncfusion® Flutter Core](https://pub.dev/packages/syncfusion_flutter_core) package, make sure to add it as a dependency following the same steps mentioned above. -### Import the package +### Import the Package 1. Navigate to the `Installing` tab on the [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) page. Under the `Import it` section, copy the package import statement. ![Package](images/copy-package.png) -2. Paste the copied import statement into the code editor and then `Save` it. +2. Paste the copied import statement into the code editor and then `Save`. ![Import](images/import-package-flutterflow.png) -### Add widget code snippet in code editor +### Add Widget Code Snippet in Code Editor -1. Navigate to the [Example](https://pub.dev/packages/syncfusion_flutter_PdfViewer/example) tab in [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) and copy the widget specific codes. +1. Navigate to the [Example](https://pub.dev/packages/syncfusion_flutter_PdfViewer/example) tab in [Syncfusion® Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_PdfViewer) and copy the widget-specific codes. ![Code](images/code-snippet.png) -2. Paste the copied code sample into the code editor, click `Format Code`, and `Save` it. +2. Paste the copied code sample into the code editor, click `Format Code`, and `Save`. ![Code snippet](images/Adding-code-snippent.png) -### Compiling the codes +### Compiling the Codes 1. Click the 'Compile Code' button located in the top right corner. 2. If there are no errors, save the process. If errors are present, fix them and compile the code again. Once the code has been successfully compiled, save the process. @@ -67,7 +67,7 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an >**Note**: The compilation progress takes 2 to 3 minutes to complete. -### Create Custom Action to import pdf.js script +### Create Custom Action to Import pdf.js Script 1. Click the `+ Add` button to open a dropdown menu, then select `Action`. 2. Update the action name as desired, say `importPdfjsScript`. @@ -101,20 +101,20 @@ Future importPdfjsScript() async { ![Custom Action](images/custom-action.png) -### Utilizing the custom action +### Utilizing the Custom Action -1. Click on main.dart file under Custom Files section. +1. Click on the main.dart file under the Custom Files section. 2. Add the `importPdfjsScript` action as Initial Action. 3. Save the file. ![main.dart](images/add-custom-action.png) -### Utilizing the custom widget +### Utilizing the Custom Widget -1. Navigate to `Widget Palette` located in the left side navigation menu. +1. Navigate to the `Widget Palette` located in the left-side navigation menu. 2. Click on the `Components` tab. -3. Your custom widget will be under `Custom Code Widgets`. Drag and drop the custom widget to your page. +3. Your custom widget will be under `Custom Code Widgets`. Drag and drop the custom widget onto your page. ![Page](images/page.png) ->**Note**: Since, the SfPdfViewer depends on the pdf.js library on the web platform, the preview of the widget will not be displayed in the FlutterFlow editor. To view the widget, run the application on a web platform. +>**Note**: Since the SfPdfViewer depends on the pdf.js library on the web platform, the preview of the widget will not be displayed in the FlutterFlow editor. To view the widget, run the application on a web platform. \ No newline at end of file diff --git a/Flutter/pdf-viewer/accessibility.md b/Flutter/pdf-viewer/accessibility.md index 6097e8029..6f3235df1 100644 --- a/Flutter/pdf-viewer/accessibility.md +++ b/Flutter/pdf-viewer/accessibility.md @@ -9,9 +9,9 @@ documentation: ug # Accessibility in Flutter PDF Viewer (SfPdfViewer) -## Screen reader +## Screen Reader -The [`SfPdfViewer`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) can be accessed by the screen readers by wrapping the [`SfPdfViewer`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) widget to the [`Semantics`](https://api.flutter.dev/flutter/widgets/Semantics-class.html) widget. +The [`SfPdfViewer`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) can be accessed by screen readers by wrapping the [`SfPdfViewer`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) widget with the [`Semantics`](https://api.flutter.dev/flutter/widgets/Semantics-class.html) widget. {% tabs %} {% highlight dart hl_lines="4 5 6 7 8 9" %} @@ -31,7 +31,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Sufficient contrast +## Sufficient Contrast The `SfPdfViewer` [theming](https://help.syncfusion.com/flutter/themes) support provides a consistent and standardized appearance, as well as the ability to set the colors for all UI elements. @@ -39,7 +39,7 @@ The following APIs allow you to customize the colors of the following elements: * [searchTextHighlightColor](https://help.syncfusion.com/flutter/pdf-viewer/text-search#customize-the-search-text-highlight-color) * [selectionColor and selectionHandleColor](https://help.syncfusion.com/flutter/pdf-viewer/text-selection#customize-the-text-selection-and-its-handle-color) -## Large fonts +## Large Fonts The font size of the [`SfPdfViewer`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) will be automatically scaled based on the device settings. @@ -50,33 +50,31 @@ Also, you can change the font size of the [`SfPdfViewer`](https://pub.dev/docume * [`Scroll head style`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfPdfViewerThemeData/scrollHeadStyle.html) * [`Scroll status style`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfPdfViewerThemeData/scrollStatusStyle.html) -## Keyboard navigation +## Keyboard Navigation The `SfPdfViewer` supports the following keyboard interactions: - + - - - - + + - + - + - + @@ -85,35 +83,33 @@ The `SfPdfViewer` supports the following keyboard interactions: - + - - + + - + - - - + - + - + - + - + @@ -123,6 +119,6 @@ The `SfPdfViewer` supports the following keyboard interactions:
ActionAction Windows Macintosh
Shortcuts for page navigation
Shortcuts for Page Navigation
Navigate to the first pageNavigate to the first page Home Function+Left arrow
Navigate to the last pageNavigate to the last page End Function+Right arrow
Navigate to the previous pageNavigate to the previous page Left arrow Left arrow
Right arrow Right arrow
Shortcuts for Zooming
Perform zoom in operation
Perform zoom in operation CONTROL + =COMMAND + =COMMAND + =
Perform zoom out operation CONTROL + - COMMAND + -
Retain the zoom level to 1Retain the zoom level to 1 CONTROL + 0 COMMAND + 0
Shortcut for Text Search
Open the search toolbarOpen the search toolbar CONTROL + FCOMMAND + FCOMMAND + F
Shortcut for Text Selection
-## Easier touch targets +## Easier Touch Targets -The [`SfPdfViewer`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) has touch target of 48 * 48, as per the standard for all the elements. +The [`SfPdfViewer`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) has a touch target of 48 x 48, as per the standard for all elements. \ No newline at end of file diff --git a/Flutter/pdf-viewer/add-remove-modify-annotations.md b/Flutter/pdf-viewer/add-remove-modify-annotations.md index d053fcdee..44e862492 100644 --- a/Flutter/pdf-viewer/add-remove-modify-annotations.md +++ b/Flutter/pdf-viewer/add-remove-modify-annotations.md @@ -11,11 +11,11 @@ documentation: ug This section will go through the various functions available in the `SfPdfViewer` for adding, removing, and editing annotations in a PDF document. -## Add annotations to a PDF document +## Add Annotations to a PDF Document This section will go through how to add annotations to a PDF document programmatically. -### Add annotations programmatically +### Add Annotations Programmatically You can programmatically add a new annotation to the PDF document by creating an annotation instance and providing it as a parameter to the [addAnnotation](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/addAnnotation.html) method of the `PdfViewerController` class. The following example shows how to create an instance of a highlight annotation and add it to the PDF document. Similarly, you can create and add other types of annotation. @@ -39,7 +39,7 @@ void addHighlightAnnotation() { {% endhighlight %} {% endtabs %} -### Annotation added callback +### Annotation Added Callback The callback provided to the [onAnnotationAdded](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onAnnotationAdded.html) property is triggered when an annotation is successfully added to the PDF document. The following example shows how to use this callback. @@ -63,11 +63,11 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Remove annotations from the PDF document +## Remove Annotations from the PDF Document This section will go through different methods of removing annotations from a PDF document. -### Remove a specific annotation programmatically +### Remove a Specific Annotation Programmatically You can programmatically remove an annotation from the document by providing the specific annotation instance as the parameter to the [removeAnnotation](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/removeAnnotation.html) method of `PdfViewerController`. The following example shows how to remove the first annotation in the annotation collection from a PDF document. @@ -88,7 +88,7 @@ void removeFirstAnnotation() { {% endhighlight %} {% endtabs %} -### Remove all the annotations +### Remove All Annotations You can programmatically remove all the annotations from a document by calling the [removeAllAnnotations](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/removeAllAnnotations.html) method. The optional `pageNumber` parameter can be used to clear the form field data on a specific page. By default, the pageNumber parameter is 0. Refer to the following code example. @@ -108,7 +108,7 @@ void removeAllAnnotationsInFirstPage() { {% endhighlight %} {% endtabs %} -### Annotation removed callback +### Annotation Removed Callback The callback provided to the [onAnnotationRemoved](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onAnnotationRemoved.html) property is triggered when an annotation is removed successfully from the PDF document. The following example shows how to use this callback. @@ -132,11 +132,11 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Edit annotations +## Edit Annotations This section will go through different methods of editing annotations in a PDF document programmatically. -### Edit a specific annotation +### Edit a Specific Annotation You can edit the properties of an annotation from the document programmatically by accessing the specific annotation instance from the Annotation collection. The following example shows how to edit the first annotation in the annotation collection. Similarly, you can modify the other properties also. @@ -159,7 +159,7 @@ void editAnnotation() { {% endhighlight %} {% endtabs %} -### Annotation edited callback +### Annotation Edited Callback The callback provided to the [onAnnotationEdited](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onAnnotationEdited.html) property is triggered when an annotation is edited in the PDF document. The following code sample explains how to use this callback. diff --git a/Flutter/pdf-viewer/annotation-collection.md b/Flutter/pdf-viewer/annotation-collection.md index 4a2867c3b..22121b002 100644 --- a/Flutter/pdf-viewer/annotation-collection.md +++ b/Flutter/pdf-viewer/annotation-collection.md @@ -9,7 +9,7 @@ documentation: ug # Annotation Collection in Flutter PDF Viewer widget (SfPdfViewer) -The annotations in the PDF document can be accessed by the `getAnnotations` method of the `PdfViewerController`. The return value of the function will have Annotation collection as soon as the document is loaded in the PDF viewer. The following code example shows how the annotation collection can be accessed. +The annotations in the PDF document can be accessed by the [getAnnotations](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/getAnnotations.html) method of the [PdfViewerController](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController-class.html). The return value of the function will have the Annotation collection as soon as the document is loaded in the PDF viewer. The following code example shows how the annotation collection can be accessed. {% tabs %} {% highlight dart hl_lines="9 10" %} diff --git a/Flutter/pdf-viewer/annotations-overview.md b/Flutter/pdf-viewer/annotations-overview.md index 62a91767c..5dc1f748e 100644 --- a/Flutter/pdf-viewer/annotations-overview.md +++ b/Flutter/pdf-viewer/annotations-overview.md @@ -9,13 +9,13 @@ documentation: ug # Annotations in Flutter PDF Viewer (SfPdfViewer) -The `SfPdfViewer` allows you to add, remove, and modify annotations in PDF documents. This section will go through the various types and functionalities available in PDF Viewer for working with annotations. +The `SfPdfViewer` allows you to add, remove, and modify annotations in PDF documents. This section will go through the various types and functionalities available in the PDF Viewer for working with annotations. -## Supported annotation types +## Supported Annotation Types -The `SfPdfViewer` supports the following annotation types. -1. Highlight -2. Squiggly -3. Strikethrough -4. Underline -5. Sticky note +The `SfPdfViewer` supports the following annotation types: +1. Highlight +2. Squiggly +3. Strikethrough +4. Underline +5. Sticky Note \ No newline at end of file diff --git a/Flutter/pdf-viewer/bookmark-navigation.md b/Flutter/pdf-viewer/bookmark-navigation.md index 25507f06d..e8cf5c29e 100644 --- a/Flutter/pdf-viewer/bookmark-navigation.md +++ b/Flutter/pdf-viewer/bookmark-navigation.md @@ -7,19 +7,19 @@ control: SfPdfViewer documentation: ug --- -# Bookmark navigation in Flutter PDF Viewer (SfPdfViewer) +# Bookmark Navigation in Flutter PDF Viewer (SfPdfViewer) -Navigate to the desired bookmark topics using the default bookmark view or the controller method programmatically. +Navigate to the desired bookmark topics using the default bookmark view or the controller method programmatically. -## Open and close the built-in bookmark view programmatically +## Open and Close the Built-in Bookmark View Programmatically -The built-in bookmark view in the `SfPdfViewer` can be opened using the [openBookmarkView](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewerState/openBookmarkView.html) method and it can be closed either by tapping the close icon or device's back button. Also, we can close the bookmark programmatically by using the Navigator’s pop method. +The built-in bookmark view in the `SfPdfViewer` can be opened using the [openBookmarkView](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewerState/openBookmarkView.html) method, and it can be closed either by tapping the close icon or the device's back button. Also, we can close the bookmark programmatically by using the Navigator’s pop method. -* You can use [isBookmarkViewOpen](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewerState/isBookmarkViewOpen.html) property of the `SfPdfViewerState` class, to know whether the built-in bookmark view is open or not. +* You can use the [isBookmarkViewOpen](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewerState/isBookmarkViewOpen.html) property of the `SfPdfViewerState` class to know whether the built-in bookmark view is open or not. ![Bookmark view](images/bookmark-navigation/bookmark_view.png) -The following code example explains the opening of built-in bookmark view programmatically. +The following code example explains the opening of the built-in bookmark view programmatically. {% tabs %} {% highlight dart hl_lines="1 15" %} @@ -44,7 +44,7 @@ Widget build(BuildContext context) { ), IconButton( icon: Icon( - Icons. bookmark, + Icons.bookmark, color: Colors.white, ), onPressed: () { @@ -63,7 +63,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Navigate to the desired bookmark topic programmatically +## Navigate to the Desired Bookmark Topic Programmatically You can navigate to the desired bookmark topic programmatically using the [jumpToBookmark](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/jumpToBookmark.html) controller method. The following code example explains the same. diff --git a/Flutter/pdf-viewer/document-link-annotation.md b/Flutter/pdf-viewer/document-link-annotation.md index 3195ef3ef..767dac959 100644 --- a/Flutter/pdf-viewer/document-link-annotation.md +++ b/Flutter/pdf-viewer/document-link-annotation.md @@ -7,13 +7,13 @@ control: SfPdfViewer documentation: ug --- -# Document link annotation in Flutter PDF Viewer (SfPdfViewer) +# Document Link Annotation in Flutter PDF Viewer (SfPdfViewer) By default, the [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) allows you to navigate to the desired topic or position by tapping its document link annotation in the table of contents in a PDF document. -## Enable or disable the document link annotation navigation +## Enable or Disable the Document Link Annotation Navigation -You can enable or disable the navigation of document link annotation using the [enableDocumentLinkAnnotation](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/enableDocumentLinkAnnotation.html) property. The following code example explains the same. +You can enable or disable the navigation of document link annotations using the [enableDocumentLinkAnnotation](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/enableDocumentLinkAnnotation.html) property. The following code example explains the same. {% tabs %} {% highlight dart hl_lines="6" %} diff --git a/Flutter/pdf-viewer/document-load-callbacks.md b/Flutter/pdf-viewer/document-load-callbacks.md index 20d7faf57..fd671a965 100644 --- a/Flutter/pdf-viewer/document-load-callbacks.md +++ b/Flutter/pdf-viewer/document-load-callbacks.md @@ -11,7 +11,7 @@ documentation: ug The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) widget supports the [onDocumentLoaded](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onDocumentLoaded.html) and [onDocumentLoadFailed](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onDocumentLoadFailed.html) callbacks to notify whether the document has been loaded completely or not. -## Document loaded callback +## Document Loaded Callback The [onDocumentLoaded](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onDocumentLoaded.html) callback triggers after the `document` is loaded in the `SfPdfViewer`. The document in the [PdfDocumentLoadedDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfDocumentLoadedDetails-class.html) will return the loaded [PdfDocument](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfDocument-class.html) instance. The following code example explains the same. @@ -32,13 +32,13 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Document load failed callback +## Document Load Failed Callback The [onDocumentLoadFailed](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onDocumentLoadFailed.html) callback triggers when the document loading fails in the `SfPdfViewer`. That is, * When any corrupted document is loaded. -* When any password-protected document is loaded with invalid or empty password. -* When any improper input source value like the wrong URL or file path is given. +* When any password-protected document is loaded with an invalid or empty password. +* When any improper input source value like a wrong URL or file path is given. * When any non-PDF document is loaded. The [PdfDocumentLoadFailedDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfDocumentLoadFailedDetails-class.html) will return the `error` title and `description` message for the failure reason. The following code example explains the same. diff --git a/Flutter/pdf-viewer/form-filling.md b/Flutter/pdf-viewer/form-filling.md index ad822ad90..b0b9bd395 100644 --- a/Flutter/pdf-viewer/form-filling.md +++ b/Flutter/pdf-viewer/form-filling.md @@ -9,7 +9,7 @@ documentation: ug # Form filling in Flutter PDF Viewer (SfPdfViewer) -The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) allows you to fill, edit, save, export, and import the AcroForm fields in a PDF document. +The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) allows you to fill, edit, save, export, and import the AcroForm fields within a PDF document. To get started quickly, you can also check out our video tutorial below. @@ -17,7 +17,7 @@ To get started quickly, you can also check out our video tutorial below. ## Supported form fields -You can load and fill in the following form fields in a PDF document using the Flutter PDF Viewer. +You can load and fill the following form fields in a PDF document using the Flutter PDF Viewer. * Text box. * Checkbox. @@ -28,11 +28,11 @@ You can load and fill in the following form fields in a PDF document using the F ## Adding or Editing the form data programmatically -Programmatically add or edit the form data in the document using the [getFormFields](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/getFormFields.html) method, which retrieves the form field collection. +Add or edit the form data programmatically in the document using the [getFormFields](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/getFormFields.html) method, which retrieves the form fields collection. ### Adding or Editing text box data -Programmatically add or edit the text of the text box by changing the [text](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextFormField/text.html) property. +Add or edit the text of the text box programmatically by changing the [text](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextFormField/text.html) property. {% tabs %} {% highlight dart hl_lines="17 18 19 20" %} @@ -73,7 +73,7 @@ Widget build(BuildContext context) { ### Adding or Editing checkbox data -Programmatically check or uncheck the checkbox by changing the [isChecked](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfCheckboxFormField/isChecked.html) property. +Check or uncheck the checkbox programmatically by changing the [isChecked](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfCheckboxFormField/isChecked.html) property. {% tabs %} {% highlight dart hl_lines="17 18 19 20" %} @@ -114,7 +114,7 @@ Widget build(BuildContext context) { ### Editing combo box data -Programmatically select an item from the combo box using the [selectedItem](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfComboBoxFormField/selectedItem.html) property. +Select an item from the combo box programmatically using the [selectedItem](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfComboBoxFormField/selectedItem.html) property. {% tabs %} {% highlight dart hl_lines="17 18 19 20" %} @@ -155,7 +155,7 @@ Widget build(BuildContext context) { ### Editing radio button data -Programmatically select an item from the radio buttons using the [selectedItem](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfRadioFormField/selectedItem.html) property. +Select an item from the radio buttons programmatically using the [selectedItem](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfRadioFormField/selectedItem.html) property. {% tabs %} {% highlight dart hl_lines="17 18 19 20" %} @@ -196,7 +196,7 @@ Widget build(BuildContext context) { ### Editing list box data -Programmatically select an item or more from the list box using the [selectedItems](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfListBoxFormField/selectedItems.html) property. +Select one or more items from the list box programmatically using the [selectedItems](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfListBoxFormField/selectedItems.html) property. {% tabs %} {% highlight dart hl_lines="17 18 19 20" %} @@ -237,7 +237,7 @@ Widget build(BuildContext context) { ### Adding or Editing signature data -Programmatically add or remove the signature in a signature form field by assigning the image bytes or `null` to the [signature](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfSignatureFormField/signature.html) property. +Add or remove the signature in a signature form field programmatically by assigning the image bytes or `null` to the [signature](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfSignatureFormField/signature.html) property. {% tabs %} {% highlight dart hl_lines="17 18 19 20 21 22" %} @@ -280,7 +280,7 @@ Widget build(BuildContext context) { ## Customize the visibility of built-in Signature pad -By default, the `SfPdfViewer` displays the signature pad when tapped on the signature form field. You can customize the visibility of the built-in signature pad using the [canShowSignaturePad](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowSignaturePadDialog.html) property. The following code example explains the same. +By default, the `SfPdfViewer` displays the signature pad when tapped on the signature form field. You can customize its visibility using the [canShowSignaturePad](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowSignaturePadDialog.html) property. The following code example explains this. {% tabs %} {% highlight dart hl_lines="9" %} @@ -303,7 +303,7 @@ Widget build(BuildContext context) { ### How to create and display a custom signature pad? -With the above option in the `SfPdfViewer`, you can easily hide the built-in signature pad and create and display a custom signature pad to draw and add personalized signatures to the signature form field. The following code example explains the same. +With the above option in the `SfPdfViewer`, you can hide the built-in signature pad and create and display a custom signature pad to draw and add personalized signatures to the signature form field. The following code example explains this. In this example, the custom signature pad using the `SfSignaturePad` will be displayed when tapping on the signature field with the following options: @@ -454,7 +454,7 @@ Widget build(BuildContext context) { ## Clear form data -The [clearFormData](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/clearFormData.html) method clears all the form field data in the PDF document. The optional `pageNumber` parameter can be used to clear the form field data on a specific page. By default, the `pageNumber` parameter is 0. Refer to the following code example. +The [clearFormData](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/clearFormData.html) method clears all form field data in the PDF document. The optional `pageNumber` parameter can be used to clear the form field data on a specific page. By default, the `pageNumber` parameter is 0. Refer to the following code example. {% tabs %} {% highlight dart hl_lines="16 26" %} @@ -581,7 +581,7 @@ Widget build(BuildContext context) { ## Importing and Exporting form data -The Flutter PDF viewer allows users to import and export form data to and from PDF documents. The import and export of form data support the following extensions. +The Flutter PDF viewer allows users to import and export form data to and from PDF documents. The import and export of form data support the following extensions: * fdf * xfdf @@ -590,7 +590,7 @@ The Flutter PDF viewer allows users to import and export form data to and from P The required file type can be chosen from the [DataFormat](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/DataFormat.html) enumeration. In the following sections, only the `xfdf` file type is explained for brevity. -N> Import ‘package:syncfusion_flutter_pdf/pdf.dart’ in the Dart code to use the [DartFormat](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/DataFormat.html) parameter. +N> Import ‘package:syncfusion_flutter_pdf/pdf.dart’ in the Dart code to use the [DartFormat](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/DataFormat.html) parameter. ### Exporting form data @@ -600,7 +600,7 @@ The [exportFormData](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/ {% highlight dart hl_lines="15 16" %} final PdfViewerController _pdfViewerController = PdfViewerController(); - + @override Widget build(BuildContext context) { return Scaffold( @@ -629,7 +629,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -N> When exporting, the signature form field data will not be exported. +N> When exporting, the signature form field data will not be exported. ### Importing form data @@ -641,7 +641,7 @@ The [importFormData](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/ {% highlight dart hl_lines="15 16 17 18" %} final PdfViewerController _pdfViewerController = PdfViewerController(); - + @override Widget build(BuildContext context) { return Scaffold( @@ -746,11 +746,11 @@ The `SfPdfViewer` supports the [PdfFormFieldFocusChangeCallback](https://pub.dev ### Form field focus change callback -The [onFormFieldFocusChange](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldFocusChange.html) callback triggers when the focus changes in or out of the form field. The [PdfFormFieldFocusChangeDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfFormFieldFocusChangeDetails-class.html) will return the `formField` instance and its focus change value in the `hasFocus` property. The following code example explains the same. +The [onFormFieldFocusChange](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldFocusChange.html) callback triggers when the focus changes in or out of the form field. The [PdfFormFieldFocusChangeDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfFormFieldFocusChangeDetails-class.html) will return the `formField` instance and its focus change value in the `hasFocus` property. The following code example explains this. {% tabs %} {% highlight dart hl_lines="9 10 11" %} - + @override Widget build(BuildContext context) { return Scaffold( @@ -773,7 +773,7 @@ N> The `PdfFormFieldFocusChangeCallback` only triggers for text boxes and signat ### Form field value changed callback -The [onFormFieldValueChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldValueChanged.html) callback triggers when the value is changed in the form field. The [PdfFormFieldValueChangedDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfFormFieldValueChangedDetails-class.html) the `formField` instance along with its `oldValue` and `newValue`. The following code example explains the same. +The [onFormFieldValueChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldValueChanged.html) callback triggers when the value is changed in the form field. The [PdfFormFieldValueChangedDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfFormFieldValueChangedDetails-class.html) the `formField` instance along with its `oldValue` and `newValue`. The following code example explains this. {% tabs %} {% highlight dart hl_lines="9 10 11 12" %} @@ -799,7 +799,7 @@ Widget build(BuildContext context) { ## How to synchronize text form field data with the text entry widget periodically for each character change? -With the help of the [onFormFieldValueChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldValueChanged.html) callback, we can synchronize text form field data with the text entry widget periodically for each character change. The following code example explains the same. +With the help of the [onFormFieldValueChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldValueChanged.html) callback, we can synchronize text form field data with the text entry widget periodically for each character change. The following code example explains this. {% tabs %} {% highlight dart %} @@ -814,7 +814,7 @@ void main() { )); } -/// Represents Homepage for Navigation +/// Represents HomePage for Navigation class HomePage extends StatefulWidget { @override _HomePage createState() => _HomePage(); @@ -865,7 +865,7 @@ class _HomePage extends State { ## How to synchronize text form field data with the text entry widget after filling it out completely? -With the help of the [onFormFieldFocusChange](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldFocusChange.html) callback, we can synchronize text form field data with the text entry widget after filling it out completely. The following code example explains the same. +With the help of the [onFormFieldFocusChange](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldFocusChange.html) callback, we can synchronize text form field data with the text entry widget after filling it out completely. The following code example explains this. {% tabs %} {% highlight dart %} @@ -880,7 +880,7 @@ void main() { )); } -/// Represents Homepage for Navigation +/// Represents HomePage for Navigation class HomePage extends StatefulWidget { @override _HomePage createState() => _HomePage(); @@ -933,7 +933,7 @@ class _HomePage extends State { ## How to perform validation over the form field data? -With the help of the [onFormFieldFocusChange](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldFocusChange.html) and [onFormFieldValueChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldValueChanged.html) callbacks and the form field programmatic options available in the `SfPdfViewer`, we can validate the form field data. The following code examples explain the same. +With the help of the [onFormFieldFocusChange](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldFocusChange.html) and [onFormFieldValueChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onFormFieldValueChanged.html) callbacks and the form field programmatic options available in the `SfPdfViewer`, we can validate the form field data. The following code examples explain this. In this example, we are validating the form field data in a registration form when saving. The validation includes, @@ -981,7 +981,7 @@ Date of birth Course -* Atleast one course should be selected. +* At least one course should be selected. diff --git a/Flutter/pdf-viewer/gesture-callbacks.md b/Flutter/pdf-viewer/gesture-callbacks.md index c91f7e05b..3b0710823 100644 --- a/Flutter/pdf-viewer/gesture-callbacks.md +++ b/Flutter/pdf-viewer/gesture-callbacks.md @@ -7,17 +7,17 @@ control: SfPdfViewer documentation: ug --- -# Gesture callbacks in Flutter PDF Viewer (SfPdfViewer) +# Gesture Callbacks in Flutter PDF Viewer (SfPdfViewer) -The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) supports the [PdfGestureCallback](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfGestureTapCallback.html), to notify the touch or mouse interaction with the widget. +The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) supports the [PdfGestureCallback](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfGestureTapCallback.html) to notify the touch or mouse interaction with the widget. -## Tap callback +## Tap Callback -The [onTap](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onTap.html) callback triggers when the user taps on the `SfPdfViewer` widget and the [PdfGestureDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfGestureDetails-class.html) returns the following information, +The [onTap](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onTap.html) callback triggers when the user taps on the `SfPdfViewer` widget, and the [PdfGestureDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfGestureDetails-class.html) returns the following information: * [pageNumber](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfGestureDetails/pageNumber.html) – This property returns the page number on which the tap took place. The value ranges from 1 to the total number of pages in the PDF document. If the tap occurs outside any PDF page boundaries, the result will be -1. -* [pagePosition](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfGestureDetails/pagePosition.html) – The property returns the page’s tapped position in the PDF coordinates. The coordinates have their origin at the top-left of the page. The number of the tapped page is identified by the PageNumber property. If the tap occurs outside any PDF page boundaries, the result will be (-1, -1). +* [pagePosition](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfGestureDetails/pagePosition.html) – This property returns the page’s tapped position in PDF coordinates. The coordinates have their origin at the top-left of the page. The number of the tapped page is identified by the PageNumber property. If the tap occurs outside any PDF page boundaries, the result will be (-1, -1). * [position](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfGestureDetails/position.html) – This property returns the tapped position on the PDF Viewer widget. The coordinate space starts at the top left of the widget. diff --git a/Flutter/pdf-viewer/getting-started.md b/Flutter/pdf-viewer/getting-started.md index 7f9f6cf5e..e77af0b95 100644 --- a/Flutter/pdf-viewer/getting-started.md +++ b/Flutter/pdf-viewer/getting-started.md @@ -7,19 +7,19 @@ control: SfPdfViewer documentation: ug --- -# Getting started with Flutter PDF Viewer (SfPdfViewer) +# Getting Started with Flutter PDF Viewer (SfPdfViewer) This section explains the steps to add the [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) widget to your Flutter application and load a PDF document. To get started quickly, you can also check out our video tutorial below. -## Add the Flutter PDF Viewer to an application +## Add the Flutter PDF Viewer to an Application Create a simple project using the instructions given in the [Getting Started with your first Flutter app](https://docs.flutter.dev/get-started/test-drive#choose-your-ide) documentation. -**Add dependency** +**Add Dependency** -Add the Syncfusion® Flutter PDF Viewer dependency to your pubspec.yaml file. +Add the Syncfusion® Flutter PDF Viewer dependency to your `pubspec.yaml` file. {% highlight dart %} @@ -33,9 +33,9 @@ N> Here **xx.x.xx** denotes the current version of the [Syncfusion® import * as pdfjsLib from 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.10.38/pdf.min.mjs'; @@ -43,7 +43,7 @@ For PdfJs library version 4.0 and above ``` -For PdfJs library versions below 4.0 +For PdfJs library versions below 4.0: ```html ``` -N> Version above **2.11.338** is recommended for using annotation support. This will not flatten the unsupported annotations while rendering the pages. +N> A version above **2.11.338** is recommended for using annotation support. This will not flatten the unsupported annotations while rendering the pages. -**Get packages** +**Get Packages** Run the following command to get the required packages. @@ -63,7 +63,7 @@ $ flutter pub get {% endhighlight %} -**Import package** +**Import Package** Import the following package in your Dart code. @@ -77,9 +77,9 @@ import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart'; **Initialize the PDF Viewer** -Once the package has been imported, add the `SfPdfViewer` widget as a child of any widget. In the following shown examples, the `SfPdfViewer` widget is added as a child of the Scaffold widget. +Once the package has been imported, add the `SfPdfViewer` widget as a child of any widget. In the following examples, the `SfPdfViewer` widget is added as a child of the `Scaffold` widget. -**Load document** +**Load Document** To display a PDF document in the PDF Viewer, add the PDF document to the application assets and use [SfPdfViewer.asset](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.asset.html) to load it from the [AssetBundle](https://api.flutter.dev/flutter/services/AssetBundle-class.html). The following code example explains the same. @@ -96,4 +96,4 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -N> You can refer to our [Flutter PDF Viewer](https://www.syncfusion.com/flutter-widgets/flutter-pdf-viewer) feature tour page for its groundbreaking feature representations. You can also explore our [Flutter PDF Viewer example](https://flutter.syncfusion.com/#/pdf-viewer/getting-started) that shows you how to render and configure the PDF Viewer. \ No newline at end of file +N> You can refer to our [Flutter PDF Viewer](https://www.syncfusion.com/flutter-widgets/flutter-pdf-viewer) feature tour page for its groundbreaking feature representations. You can also explore our [Flutter PDF Viewer example](https://flutter.syncfusion.com/#/pdf-viewer/getting-started), which shows you how to render and configure the PDF Viewer. \ No newline at end of file diff --git a/Flutter/pdf-viewer/hyperlink-navigation.md b/Flutter/pdf-viewer/hyperlink-navigation.md index 81e3322f6..970282cf7 100644 --- a/Flutter/pdf-viewer/hyperlink-navigation.md +++ b/Flutter/pdf-viewer/hyperlink-navigation.md @@ -7,13 +7,13 @@ control: SfPdfViewer documentation: ug --- -# Hyperlink navigation in Flutter PDF Viewer (SfPdfViewer) +# Hyperlink Navigation in Flutter PDF Viewer (SfPdfViewer) The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) allows you to open URLs or website links in the default browser. You can hide the built-in hyperlink navigation dialog or add a customized one with supported functionalities. ![Hyperlink navigation dialog](images/hyperlink-navigation/hyperlink_navigation_dialog.jpg) -## Enable or disable the hyperlink navigation +## Enable or Disable the Hyperlink Navigation You can enable or disable the hyperlink navigation using the [enableHyperlinkNavigation](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/enableHyperlinkNavigation.html) property. The following code example explains the same. @@ -36,7 +36,7 @@ You can enable or disable the hyperlink navigation using the [enableHyperlinkNav {% endhighlight %} {% endtabs %} -## Customize the visibility of the hyperlink navigation dialog +## Customize the Visibility of the Hyperlink Navigation Dialog By default, the built-in hyperlink navigation dialog will be displayed when any hyperlink is clicked. You can customize the visibility of the hyperlink navigation dialog using the [canShowHyperlinkDialog](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowHyperlinkDialog.html) property. The following code example explains the same. @@ -63,7 +63,7 @@ By default, the built-in hyperlink navigation dialog will be displayed when any The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) hyperlink navigation supports the [PdfHyperlinkClickedCallback](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfHyperlinkClickedCallback.html) to notify when any hyperlink is clicked. -### Hyperlink clicked callback +### Hyperlink Clicked Callback The [onHyperlinkClicked](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onHyperlinkClicked.html) callback triggers when any hyperlink in the PDF document is clicked. The [PdfHyperlinkClickedDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfHyperlinkClickedDetails-class.html) will return the [uri](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfHyperlinkClickedDetails/uri.html) clicked in the PDF document. The following code example explains the same. diff --git a/Flutter/pdf-viewer/interaction-modes.md b/Flutter/pdf-viewer/interaction-modes.md index d1d1bd1d9..22d5c3d42 100644 --- a/Flutter/pdf-viewer/interaction-modes.md +++ b/Flutter/pdf-viewer/interaction-modes.md @@ -7,16 +7,16 @@ control: SfPdfViewer documentation: ug --- -# Interaction modes in Flutter PDF Viewer (SfPdfViewer) +# Interaction Modes in Flutter PDF Viewer (SfPdfViewer) -The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) supports the following interaction modes for easy interaction with the PDF documents on a desktop web browser, +The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) supports the following interaction modes for easy interaction with the PDF documents on a desktop web browser: -* selection -* pan +* Selection +* Pan -N> On a touch device, setting the [interactionMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/interactionMode.html) property to the `selection` mode will have no effect since panning is the default mode for scrolling and the selection is made by long-pressing a word in the document. +N> On a touch device, setting the [interactionMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/interactionMode.html) property to the `selection` mode will have no effect since panning is the default mode for scrolling, and the selection is made by long-pressing a word in the document. -## Selection mode +## Selection Mode By default, the `selection` interaction mode will be enabled on a desktop web browser and allows users to select and copy text from the PDF files. This also helps to copy and share the text content. Refer to the following code to enable the `selection` mode in `SfPdfViewer`. @@ -34,7 +34,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Pan mode +## Pan Mode In `pan` mode, the dragging and scrolling of the pages can be performed in any direction using the mouse and touch interactions on a desktop web browser, but the text selection cannot be performed. Refer to the following code to enable the `pan` mode in `SfPdfViewer`. diff --git a/Flutter/pdf-viewer/localization.md b/Flutter/pdf-viewer/localization.md index f3b8c16c0..49e8ababd 100644 --- a/Flutter/pdf-viewer/localization.md +++ b/Flutter/pdf-viewer/localization.md @@ -9,7 +9,7 @@ documentation: ug # Localization in Flutter PDF Viewer (SfPdfViewer) -By default, the `SfPdfViewer` widget supports US English localization. You can change the other languages by specifying the `MaterialApp` properties and adding the `flutter_localizations` and `syncfusion_localizations` package to your application. +By default, the `SfPdfViewer` widget supports US English localization. You can change the other languages by specifying the `MaterialApp` properties and adding the `flutter_localizations` and `syncfusion_localizations` packages to your application. To use `flutter_localizations` and `syncfusion_localizations`, add the packages as a dependency to the `pubspec.yaml` file. diff --git a/Flutter/pdf-viewer/lock-unlock-annotations.md b/Flutter/pdf-viewer/lock-unlock-annotations.md index f019c5749..cb55607b4 100644 --- a/Flutter/pdf-viewer/lock-unlock-annotations.md +++ b/Flutter/pdf-viewer/lock-unlock-annotations.md @@ -7,11 +7,11 @@ control: SfPdfViewer documentation: ug --- -# Lock and Unlock Annotations in Flutter PDF Viewer widget (SfPdfViewer) +# Lock and Unlock Annotations in Flutter PDF Viewer Widget (SfPdfViewer) You can lock an annotation to prevent it from being edited. The annotation that has been locked cannot be removed or edited further until it is unlocked. This section will go through the process of locking and unlocking annotations in a PDF document. -## Lock all annotations in a document +## Lock All Annotations in a Document To lock all annotations in a document, set the `isLocked` property of the `annotationSettings` to true. The following example explains how to lock all annotations in a document. @@ -28,7 +28,7 @@ void lockAllAnnotations() { * Similarly, to unlock all the annotations, set the `isLocked` property value to false. -## Lock a specific annotation +## Lock a Specific Annotation To lock a specific annotation in a document, access the annotation instance and set the `isLocked` property of the annotation to true. The following example explains how to lock the first annotation in a PDF document. @@ -51,9 +51,9 @@ void lockFirstAnnotation() { * Similarly, to unlock the annotation, set the `isLocked` property value to false. -## Lock specific annotation types +## Lock Specific Annotation Types -You can also use the `annotationSettings` property to lock a specific annotation type in a document. The following example explains how to lock all the underline annotations in a document by accessing the underline annotation settings. Similarly, you can lock other types of annotation. +You can also use the `annotationSettings` property to lock a specific annotation type in a document. The following example explains how to lock all the underline annotations in a document by accessing the underline annotation settings. Similarly, you can lock other types of annotations. {% tabs %} {% highlight dart %} @@ -71,7 +71,7 @@ void lockUnderlineAnnotations() { * Similarly, to unlock the specific annotation types, set the `isLocked` property value to false. -## Lock the selected annotation +## Lock the Selected Annotation To lock the selected annotation, access the selected annotation instance and set the `isLocked` property to true. The selected annotation instance may be obtained from the `onAnnotationSelected` callback. The following example explains locking the selected annotation in a PDF document. diff --git a/Flutter/pdf-viewer/magnification.md b/Flutter/pdf-viewer/magnification.md index 83c9c6b27..b59df7112 100644 --- a/Flutter/pdf-viewer/magnification.md +++ b/Flutter/pdf-viewer/magnification.md @@ -9,9 +9,9 @@ documentation: ug # Magnification in Flutter PDF Viewer (SfPdfViewer) -The content of a document can be zoomed in and out either by pinch to zoom or changing the zoom level factor programmatically. +The content of a document can be zoomed in and out either by pinch to zoom or by changing the zoom level factor programmatically. -## Change the zoom level factor programmatically +## Change the Zoom Level Factor Programmatically You can change or control the zoom level factor programmatically using the [zoomLevel](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/zoomLevel.html) property. The zoom level factor value can be set to 1.0 and above. The default value is 1.0. The following code example explains the same. @@ -53,7 +53,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Set and adjust the maximum zoom level +## Set and Adjust the Maximum Zoom Level The `SfPdfViewer` allows you to set and adjust the maximum zoom level for the PDF document being displayed using the `maxZoomLevel` property. The following code example explains the same. @@ -71,11 +71,11 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -### Active viewport rendering at higher zoom levels +### Active Viewport Rendering at Higher Zoom Levels With the support of active viewport rendering, at higher zoom levels, only the parts of the PDF file that are visible on-screen are rendered, ignoring the parts outside the viewport. The mode is automatically enabled when the page size or zoom increases beyond the zoom level of 2. This approach will be helpful to open large-size pages containing PDF documents at higher zoom levels. -## Enable or disable the double-tap zoom. +## Enable or Disable the Double-Tap Zoom By default, the `SfPdfViewer` will be zoomed in and out when double-tapped. You can enable or disable the double-tap zoom using the [enableDoubleTapZooming](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/enableDoubleTapZooming.html) property. The following code example explains the same. @@ -99,13 +99,13 @@ N> On a desktop web browser, this `enableDoubleTapZooming` property will have no The `SfPdfViewer` magnification supports the [PdfZoomLevelChangedCallback](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfZoomLevelChangedCallback.html) to notify the zoom level changes. -### Zoom level changed callback +### Zoom Level Changed Callback The [onZoomLevelChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onZoomLevelChanged.html) callback triggers when the zoom level is changed in the `SfPdfViewer`. That is, -• When the pinch zoom is performed. -• When the double-tap zoom is performed. -• When the `zoomLevel` property is changed. +• When the pinch zoom is performed. +• When the double-tap zoom is performed. +• When the `zoomLevel` property is changed. The [PdfZoomDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfZoomDetails-class.html) will return the `oldZoomLevel` title and `newZoomLevel` values. The following code example explains the same. diff --git a/Flutter/pdf-viewer/open-a-document-from-base64.md b/Flutter/pdf-viewer/open-a-document-from-base64.md index 8302fd02c..905c5ddc4 100644 --- a/Flutter/pdf-viewer/open-a-document-from-base64.md +++ b/Flutter/pdf-viewer/open-a-document-from-base64.md @@ -134,6 +134,5 @@ class Base64PDFSource extends PDFSource { } } - {% endhighlight %} {% endtabs %} \ No newline at end of file diff --git a/Flutter/pdf-viewer/open-a-document-from-url.md b/Flutter/pdf-viewer/open-a-document-from-url.md index dff8d7d86..df32b16f3 100644 --- a/Flutter/pdf-viewer/open-a-document-from-url.md +++ b/Flutter/pdf-viewer/open-a-document-from-url.md @@ -24,19 +24,18 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -To load PDF from network using [SfPdfViewer.network](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.network.html) in macOS, network access must be enabled in your macOS application. On your `macos/Runner/DebugProfile.entitlements` file, add the following lines inside the `` -tag to enable the network access in your application: +To load a PDF from network using [SfPdfViewer.network](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.network.html) on macOS, network access must be enabled in your macOS application. In your `macos/Runner/DebugProfile.entitlements` file, add the following lines inside the `` tag to enable network access in your application: ```html com.apple.security.network.client ``` -N> Due to CORS security restrictions in a web application, some PDFs obtained from URLs might not be loaded in the `SfPdfViewer` web platform. Kindly refer to the flutter [forum](https://github.com/flutter/flutter/issues/51125) reported on the same. +N> Due to CORS security restrictions in a web application, some PDFs obtained from URLs might not be loaded on the `SfPdfViewer` web platform. Kindly refer to the Flutter [forum](https://github.com/flutter/flutter/issues/51125) for more information on this issue. -This issue can be resolved by configuring the CORS settings in the requested server or by disabling the security settings in **chrome.dart** as mentioned in the below steps: +This issue can be resolved by configuring the CORS settings on the requested server or by disabling the security settings in **chrome.dart** as mentioned in the steps below: -1. Go to **flutter\bin\cache** and remove a file named: **flutter_tools.stamp** -2. Go to **flutter\packages\flutter_tools\lib\src\web** and open the file **chrome.dart**. -3. Find **'--disable-extensions'**. -4. Add **'--disable-web-security'**. \ No newline at end of file +Go to **flutter\bin\cache** and remove a file named: **flutter_tools.stamp**. +Go to **flutter\packages\flutter_tools\lib\src\web** and open the file **chrome.dart**. +Find **'--disable-extensions'**. +Add **'--disable-web-security'**. diff --git a/Flutter/pdf-viewer/open-a-document.md b/Flutter/pdf-viewer/open-a-document.md index b2518c79b..5ea45c3be 100644 --- a/Flutter/pdf-viewer/open-a-document.md +++ b/Flutter/pdf-viewer/open-a-document.md @@ -9,19 +9,19 @@ documentation: ug # Open a Document in Flutter PDF Viewer (SfPdfViewer) -The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) widget allows you to open PDF documents from various sources, like local storage, memory or URLs using respective constructors. It also lets you view password-protected documents. +The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) widget allows you to open PDF documents from various sources, like local storage, memory, or URLs using respective constructors. It also lets you view password-protected documents. This section walks you through the loading of documents in `SfPdfViewer` and handling the load-specific events. -## Supported constructor types +## Supported Constructor Types -The `SfPdfViewer` supports the following constructor types. -1. Asset -2. Network -3. Memory -4. File +The `SfPdfViewer` supports the following constructor types: +1. Asset +2. Network +3. Memory +4. File -## Load the document with the specified page +## Load the Document with the Specified Page The `SfPdfViewer` allows you to load the document with the specified page using the `initialPageNumber` property. The following code example explains the same. @@ -39,9 +39,9 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -N> It is recommended not to use both the [initialScrollOffset](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/initialScrollOffset.html) and `initialPageNumber` properties at the same time. If both properties are defined, the `initialPageNumber` will be prioritized over the [initialScrollOffset](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/initialScrollOffset.html) +N> It is recommended not to use both the [initialScrollOffset](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/initialScrollOffset.html) and [initialPageNumber](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/initialPageNumber.html) properties at the same time. If both properties are defined, the [initialPageNumber](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/initialPageNumber.html) will be prioritized over the [initialScrollOffset](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/initialScrollOffset.html). -## Load document with the specified scroll offset position or zoom level +## Load Document with the Specified Scroll Offset Position or Zoom Level The `SfPdfViewer` allows you to load the document with the specified scroll offset position or zoom level using the [initialScrollOffset](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/initialScrollOffset.html) and [initialZoomLevel](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/initialZoomLevel.html) properties. The following code example explains the same. diff --git a/Flutter/pdf-viewer/overview.md b/Flutter/pdf-viewer/overview.md index 4ad6eb4e6..fc7cb9f3b 100644 --- a/Flutter/pdf-viewer/overview.md +++ b/Flutter/pdf-viewer/overview.md @@ -9,21 +9,21 @@ documentation: ug # Flutter PDF Viewer (SfPdfViewer) Overview -The Syncfusion® [Flutter PDF Viewer](https://www.syncfusion.com/flutter-widgets/flutter-pdf-viewer) widget allows you to view PDF documents seamlessly and efficiently in Android, iOS, Web, Windows, and macOS platforms. It has highly interactive and customizable features such as magnification, virtual scrolling, page navigation, text selection, text search, and bookmark navigation. +The Syncfusion® [Flutter PDF Viewer](https://www.syncfusion.com/flutter-widgets/flutter-pdf-viewer) widget allows you to view PDF documents seamlessly and efficiently on Android, iOS, Web, Windows, and macOS platforms. It has highly interactive and customizable features such as magnification, virtual scrolling, page navigation, text selection, text search, and bookmark navigation. ## Key Features -* **Virtual Scrolling** - 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. +* **Virtual Scrolling** - Easily scroll through the pages in the document with a fluent experience. The pages are rendered only when required to increase loading and scrolling performance. * **Magnification** - The content of the document can be efficiently zoomed in and out. -* **Text selection** - Select text presented in a PDF document. -* **Text search** - Search for text and navigate to all its occurrences in a PDF document instantly. -* **Page navigation** - Navigate to the desired pages instantly. -* **Bookmark navigation** - Bookmarks saved in the document are loaded and made ready for easy navigation. This feature helps navigate the topics bookmarked already within the PDF document. -* **Document link annotation navigation** - 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. -* **Hyperlink navigation** - Detects hyperlinks, and tapping on the hyperlink will open the URL in a default web browser. -* **Text markup annotations** - 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. -* **Sticky note annotations** - Add, remove, and modify sticky note annotations in PDF files. This feature will help add comments or notes to a specific part a document to clarify complex concepts, terms, or ideas. -* **Form filling** - Fill, edit, flatten, save, export, and import AcroForm field data in a PDF document. +* **Text Selection** - Select text presented in a PDF document. +* **Text Search** - Search for text and navigate to all its occurrences in a PDF document instantly. +* **Page Navigation** - Navigate to the desired pages instantly. +* **Bookmark Navigation** - Bookmarks saved in the document are loaded and made ready for easy navigation. This feature helps navigate the topics bookmarked already within the PDF document. +* **Document Link Annotation Navigation** - 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. +* **Hyperlink Navigation** - Detects hyperlinks, and tapping on the hyperlink will open the URL in a default web browser. +* **Text Markup Annotations** - 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. +* **Sticky Note Annotations** - Add, remove, and modify sticky note annotations in PDF files. This feature will help add comments or notes to a specific part of a document to clarify complex concepts, terms, or ideas. +* **Form Filling** - Fill, edit, flatten, save, export, and import AcroForm field data in a PDF document. * **Themes** - Easily switch between light and dark themes. * **Localization** - All static text within the PDF Viewer can be localized to any supported language. * **Accessibility** - Easily accessible by screen readers. diff --git a/Flutter/pdf-viewer/page-layout-and-scroll-direction.md b/Flutter/pdf-viewer/page-layout-and-scroll-direction.md index 722b9a302..36ae2f214 100644 --- a/Flutter/pdf-viewer/page-layout-and-scroll-direction.md +++ b/Flutter/pdf-viewer/page-layout-and-scroll-direction.md @@ -7,18 +7,18 @@ control: SfPdfViewer documentation: ug --- -# Page layout and Scrolling options in Flutter PDF Viewer (SfPdfViewer) +# Page Layout and Scrolling Options in Flutter PDF Viewer (SfPdfViewer) -Page layout modes describe how the PDF page is displayed and, scrolling options describe the direction in which the PDF pages can be scrolled in [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html). +Page layout modes describe how the PDF page is displayed, and scrolling options describe the direction in which the PDF pages can be scrolled in [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html). -## Page layout modes +## Page Layout Modes The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) supports the following page layout modes: * Continuous page layout mode * Single page layout mode -### Continuous page layout mode +### Continuous Page Layout Mode By default, the `continuous` page layout mode is enabled, which scrolls the PDF pages vertically and horizontally. To enable the `continuous` page layout mode in `SfPdfViewer`, use the following code sample. @@ -28,7 +28,7 @@ By default, the `continuous` page layout mode is enabled, which scrolls the PDF @override Widget build(BuildContext context) { return Scaffold( - body:SfPdfViewer.network( + body: SfPdfViewer.network( 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', pageLayoutMode: PdfPageLayoutMode.continuous)); } @@ -36,7 +36,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -### Single page layout mode +### Single Page Layout Mode In `Single` page layout mode, PDFs will be displayed page by page horizontally. To enable the `Single` page layout mode in `SfPdfViewer`, use the following code sample. @@ -46,7 +46,7 @@ In `Single` page layout mode, PDFs will be displayed page by page horizontally. @override Widget build(BuildContext context) { return Scaffold( - body:SfPdfViewer.network( + body: SfPdfViewer.network( 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', pageLayoutMode: PdfPageLayoutMode.single)); } @@ -56,7 +56,7 @@ Widget build(BuildContext context) { ![Single page layout mode in Flutter PDF Viewer.](images/page-layout-and-scroll-direction/flutter-pdf-viewer-page-by-page.gif) -## Scrolling options +## Scrolling Options The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) supports the following scrolling options: @@ -65,7 +65,7 @@ The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/lat If the scroll direction is not specified, continuous page layout mode defaults to vertical scrolling, and single page layout mode defaults to horizontal scrolling. -### Vertical scrolling +### Vertical Scrolling By default, `Vertical` scrolling is enabled, which moves the PDF pages from up to down. To enable the `Vertical` scrolling in `SfPdfViewer`, use the following code sample. @@ -75,7 +75,7 @@ By default, `Vertical` scrolling is enabled, which moves the PDF pages from up t @override Widget build(BuildContext context) { return Scaffold( - body:SfPdfViewer.network( + body: SfPdfViewer.network( 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', scrollDirection: PdfScrollDirection.vertical)); } @@ -83,7 +83,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -### Horizontal scrolling +### Horizontal Scrolling In `Horizontal` scrolling, PDF pages can be scrolled from left to right. To enable the `Horizontal` scrolling in `SfPdfViewer`, use the following code sample. @@ -93,7 +93,7 @@ In `Horizontal` scrolling, PDF pages can be scrolled from left to right. To enab @override Widget build(BuildContext context) { return Scaffold( - body:SfPdfViewer.network( + body: SfPdfViewer.network( 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', scrollDirection: PdfScrollDirection.horizontal)); } diff --git a/Flutter/pdf-viewer/page-navigation.md b/Flutter/pdf-viewer/page-navigation.md index f5a314929..df611ea1b 100644 --- a/Flutter/pdf-viewer/page-navigation.md +++ b/Flutter/pdf-viewer/page-navigation.md @@ -7,15 +7,15 @@ control: SfPdfViewer documentation: ug --- -# Page navigation in Flutter PDF Viewer (SfPdfViewer) +# Page Navigation in Flutter PDF Viewer (SfPdfViewer) Navigate to the desired pages instantly either by using the page navigation dialog or the controller methods programmatically. If the desired page doesn’t exist, then the navigation will not happen, and the older page will be retained. ![Page navigation dialog](images/page-navigation/page_navigation_dialog.png) -## Navigate to the desired page programmatically +## Navigate to the Desired Page Programmatically -The [jumpToPage](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/jumpToPage.html) controller method helps you to navigate to the specified page number in a PDF document. The following code example explains the same +The [jumpToPage](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/jumpToPage.html) controller method helps you to navigate to the specified page number in a PDF document. The following code example explains the same. {% tabs %} {% highlight dart hl_lines="21" %} @@ -55,7 +55,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Navigate to the next and previous page programmatically +## Navigate to the Next and Previous Page Programmatically The [nextPage](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/nextPage.html) and [previousPage](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/previousPage.html) controller methods help you to navigate to the next and previous page of a PDF document. The following code example explains the same. @@ -106,7 +106,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Navigate to the first and last page programmatically +## Navigate to the First and Last Page Programmatically The [firstPage](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/firstPage.html) and [lastPage](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/lastPage.html) controller methods help you to navigate to the first and last page of a PDF document. The following code example explains the same. @@ -157,7 +157,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Navigate to the desired offset programmatically +## Navigate to the Desired Offset Programmatically The [jumpTo](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/jumpTo.html) controller method moves the scroll position of the `SfPdfViewer` to the specified horizontal and vertical offset. If the specified offset value is wrong, then the scroll will not happen, and the older position will be retained. @@ -205,7 +205,7 @@ Widget build(BuildContext context) { The `SfPdfViewer` page navigation supports the [PdfPageChangedCallback](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfPageChangedCallback.html) to notify the page changes. -### Page changed callback +### Page Changed Callback The [onPageChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onPageChanged.html) callback triggers when the page is changed in the `SfPdfViewer`. That is, @@ -214,7 +214,7 @@ The [onPageChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/l * When scrolling is performed programmatically using the [jumpTo](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/jumpTo.html) controller method. * When bookmark navigation is performed programmatically using the [jumpToBookmark](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/jumpToBookmark.html) controller method. -The [PdfPageChangedDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfPageChangedDetails-class.html) will return the `oldPageNumber`, `newPageNumber`, `isFirstPage` and `isLastPage` values. The following code example explains the same. +The [PdfPageChangedDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfPageChangedDetails-class.html) will return the `oldPageNumber`, `newPageNumber`, `isFirstPage`, and `isLastPage` values. The following code example explains the same. {% tabs %} {% highlight dart hl_lines="6 7 8 9" %} diff --git a/Flutter/pdf-viewer/right-to-left.md b/Flutter/pdf-viewer/right-to-left.md index 5ac5c6b50..555fedb8b 100644 --- a/Flutter/pdf-viewer/right-to-left.md +++ b/Flutter/pdf-viewer/right-to-left.md @@ -9,13 +9,13 @@ documentation: ug # Right to Left (RTL) in Flutter PDF Viewer (SfPdfViewer) -The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) supports right-to-left rendering. All the user interface elements will be rendered based on LTR and RTL direction, and the functionalities like text search and copying text also support RTL languages. +The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) supports right-to-left rendering. All the user interface elements will be rendered based on LTR and RTL direction, and functionalities like text search and copying text also support RTL languages. -## RTL rendering ways +## RTL Rendering Ways -Right to left rendering can be switched in the following ways: +Right-to-left rendering can be switched in the following ways: -### Wrapping the SfPdfViewer with Directionality widget +### Wrapping the SfPdfViewer with Directionality Widget To change the rendering direction from right to left, wrap the [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) widget inside the [Directionality](https://api.flutter.dev/flutter/widgets/Directionality-class.html) widget and set the [textDirection](https://api.flutter.dev/flutter/widgets/Directionality/textDirection.html) property as [TextDirection.rtl](https://api.flutter.dev/flutter/widgets/Directionality/textDirection.html). @@ -60,11 +60,11 @@ To change the rendering direction from right to left, wrap the [SfPdfViewer](htt {% endhighlight %} {% endtabs %} -### Changing the locale to RTL languages +### Changing the Locale to RTL Languages To change the [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) rendering direction from right to left, change the [locale](https://api.flutter.dev/flutter/material/MaterialApp/locale.html) to any of the RTL languages such as Arabic, Persian, Hebrew, Pashto, and Urdu. -To use `flutter_localizations`, add the package as dependency to `pubspec.yaml` file. +To use `flutter_localizations`, add the package as a dependency in the `pubspec.yaml` file. {% highlight dart %} @@ -74,7 +74,7 @@ flutter_localizations: {% endhighlight %} -Then, import the `flutter_localizations` library, specify [localizationsDelegates](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate-class.html) and `supportedLocales` for `MaterialApp`. +Then, import the `flutter_localizations` library, and specify [localizationsDelegates](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate-class.html) and `supportedLocales` for `MaterialApp`. {% tabs %} {% highlight dart %} @@ -122,4 +122,4 @@ Then, import the `flutter_localizations` library, specify [localizationsDelegate {% endhighlight %} {% endtabs %} -N> RTL scrolling is not supported in single page layout mode when the [scrollDirection](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/scrollDirection.html) property is set to `PdfScrollDirection.horizontal`. \ No newline at end of file +N> RTL scrolling is not supported in single-page layout mode when the [scrollDirection](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/scrollDirection.html) property is set to `PdfScrollDirection.horizontal`. \ No newline at end of file diff --git a/Flutter/pdf-viewer/scrolling.md b/Flutter/pdf-viewer/scrolling.md index bbf289642..cc051eaac 100644 --- a/Flutter/pdf-viewer/scrolling.md +++ b/Flutter/pdf-viewer/scrolling.md @@ -13,11 +13,11 @@ The Syncfusion® [Flutter PDF Viewer](https://www.syncfusion.com/f W> Please note that since the PDF Viewer has built-in scrolling capability, it is advised to avoid placing the PDF Viewer inside other controls that also offer scrolling, such as ScrollView. Nesting within such controls may cause unexpected issues. -## Navigate to the desired offset programmatically +## Navigate to the Desired Offset Programmatically The [jumpTo](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/jumpTo.html) controller method moves the scroll position of the `SfPdfViewer` to the specified horizontal and vertical offset. If the specified offset value is wrong, then the scroll will not happen, and the older position will be retained. -N> Both the `xOffset` and `yOffset` are optional parameters and if the offset values are not provided, then the `SfPdfViewer` will be scrolled or moved to the default position (0, 0). +N> Both the `xOffset` and `yOffset` are optional parameters, and if the offset values are not provided, then the `SfPdfViewer` will be scrolled or moved to the default position (0, 0). {% tabs %} {% highlight dart hl_lines="21" %} @@ -57,15 +57,14 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} - -## Get the current scroll offset position +## Get the Current Scroll Offset Position The `SfPdfViewer` allows you to get the current scroll offset position using the [scrollOffset](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/scrollOffset.html) property. The following code example explains the same. {% tabs %} {% highlight dart hl_lines="16 17" %} -final PdfViewerController _pdfViewerController=PdfViewerController(); +final PdfViewerController _pdfViewerController = PdfViewerController(); @override Widget build(BuildContext context) { @@ -80,8 +79,8 @@ Widget build(BuildContext context) { ), onPressed: () { _pdfViewerController.jumpToPage(3); - print( _pdfViewerController.scrollOffset.dy); - print( _pdfViewerController.scrollOffset.dx); + print(_pdfViewerController.scrollOffset.dy); + print(_pdfViewerController.scrollOffset.dx); }, ), ], diff --git a/Flutter/pdf-viewer/select-deselect-annotations.md b/Flutter/pdf-viewer/select-deselect-annotations.md index 2746edae8..9d07c0d8d 100644 --- a/Flutter/pdf-viewer/select-deselect-annotations.md +++ b/Flutter/pdf-viewer/select-deselect-annotations.md @@ -7,17 +7,17 @@ control: SfPdfViewer documentation: ug --- -# Select and Deselect Annotations in Flutter PDF Viewer widget (SfPdfViewer) +# Select and Deselect Annotations in Flutter PDF Viewer Widget (SfPdfViewer) This section will go through the various functions available in the `SfPdfViewer` for selecting and deselecting annotations in a PDF document. -## Select an annotation +## Select an Annotation You can select an annotation by simply tapping on the annotation using touch or mouse. When the annotation is selected, the selection border (selector) appears, indicating that the annotation is selected. -### Select an annotation programmatically +### Select an Annotation Programmatically -You can select an annotation programmatically by providing the annotation instance as the parameter to the `selectAnnotation` method of the PdfViewerController. The annotation instance can be found in the `getAnnotations` method of the PdfViewerController. The following example explains how to select the first annotation in the annotation collection. +You can select an annotation programmatically by providing the annotation instance as the parameter to the [selectAnnotation](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/selectAnnotation.html) method of the [PdfViewerController](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController-class.html). The annotation instance can be found using the [getAnnotations](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/getAnnotations.html) method of the [PdfViewerController](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController-class.html). The following example explains how to select the first annotation in the annotation collection. {% tabs %} {% highlight dart hl_lines="8" %} @@ -36,9 +36,9 @@ void selectFirstAnnotation() { {% endhighlight %} {% endtabs %} -### Annotation selected callback +### Annotation Selected Callback -The callback provided to the `onAnnotationSelected` property is triggered when an annotation is selected interactively or programmatically. The selected annotation instance can be obtained from the callback details. The following code sample explains how to use this callback. +The callback provided to the [onAnnotationSelected](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onAnnotationSelected.html) property is triggered when an annotation is selected interactively or programmatically. The selected annotation instance can be obtained from the callback details. The following code sample explains how to use this callback. {% tabs %} {% highlight dart hl_lines="7 8 9 10" %} @@ -61,7 +61,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -### Customizing selector appearance +### Customizing Selector Appearance The `annotationSettings` property of `PdfViewerController` allows you to customize the default selector color. The following example explains how to customize the selector color for locked and unlocked annotations. @@ -80,14 +80,14 @@ void customizeSelectorAppearance() { {% endhighlight %} {% endtabs %} -## Deselect an annotation +## Deselect an Annotation -You can deselect an annotation by tapping outside its bounds using a touch or mouse. When the annotation is deselected, the selection border (selector) disappears, indicating that the annotation is deselected. +You can deselect an annotation by tapping outside its bounds using touch or mouse. When the annotation is deselected, the selection border (selector) disappears, indicating that the annotation is deselected. * In desktop platforms like Windows, macOS, and desktop web, you can also use the keyboard shortcut Esc to deselect an annotation. -### Deselect an annotation programmatically +### Deselect an Annotation Programmatically -You can deselect the annotation programmatically by providing the selected annotation instance as the parameter to the `deselectAnnotation` method. The selected annotation instance may be obtained from the `onAnnotationSelected` callback. The following example shows how to deselect the selected annotation. +You can deselect the annotation programmatically by providing the selected annotation instance as the parameter to the [deselectAnnotation](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/deselectAnnotation.html) method. The selected annotation instance can be obtained from the [onAnnotationSelected](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onAnnotationSelected.html) callback. The following example shows how to deselect the selected annotation. {% tabs %} {% highlight dart hl_lines="3" %} @@ -100,7 +100,7 @@ void deselectAnnotation(Annotation selectedAnnotation) { {% endhighlight %} {% endtabs %} -### Annotation deselected callback +### Annotation Deselected Callback The callback provided to the `onAnnotationDeselected` property is triggered when an annotation is deselected interactively or programmatically. The following code sample explains how to use this callback. @@ -123,6 +123,4 @@ Widget build(BuildContext context) { } {% endhighlight %} -{% endtabs %} - - +{% endtabs %} \ No newline at end of file diff --git a/Flutter/pdf-viewer/sticky-notes.md b/Flutter/pdf-viewer/sticky-notes.md index c6a08db6a..355254b1c 100644 --- a/Flutter/pdf-viewer/sticky-notes.md +++ b/Flutter/pdf-viewer/sticky-notes.md @@ -9,26 +9,26 @@ documentation: ug # Sticky Note Annotations in Flutter PDF Viewer Widget (SfPdfViewer) -The sticky note annotation feature of `SfPdfViewer` allows you to add, remove, and modify sticky notes in a PDF document. This feature will help add comments or notes to specific parts of a document to clarify complex concepts, terms, or ideas. This section will cover the various functions available in `SfPdfViewer` for working with sticky note annotations. +The sticky note annotation feature of `SfPdfViewer` allows you to add, remove, and modify sticky notes in a PDF document. This feature can help add comments or notes to specific parts of a document to clarify complex concepts, terms, or ideas. This section will cover the various functions available in `SfPdfViewer` for working with sticky note annotations. -## Types of sticky notes +## Types of Sticky Notes The following sticky note icon types are currently available in `SfPdfViewer`. The icon types can be selected from the [PdfStickyNoteIcon](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfStickyNoteIcon.html) enumeration. ![Sticky note icon types](images/annotations/sticky-note-icon-types.png) -## Add sticky notes +## Add Sticky Notes This section will go through how to add sticky note annotations to a PDF document interactively and programmatically. -### Add sticky notes from annotation mode +### Add Sticky Notes from Annotation Mode You can add sticky note annotations to a PDF document by tapping with a touch (or mouse down) on a PDF page. The following steps explain how to add sticky note annotations to a PDF: 1. Set the [annotationMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationMode.html) property of the PdfViewerController to `stickyNote`. This activates the sticky note mode on the control. -2. Tap (or mouse down) on a PDF page, where you want to add the sticky note annotation. This will add a sticky note with a default style and a popup will be displayed to write and submit the text. -4. You can later select and edit the annotations, if required. -5. If you need to disable the [annotationMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationMode.html) of `stickyNote`, you need to change the [annotationMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationMode.html) to `none`. +2. Tap (or mouse down) on a PDF page, where you want to add the sticky note annotation. This will add a sticky note with a default style, and a popup will be displayed to write and submit the text. +3. You can later select and edit the annotations if required. +4. If you need to disable the [annotationMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationMode.html) of `stickyNote`, you need to change the [annotationMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationMode.html) to `none`. The following code explains how to enable the sticky note annotation mode. @@ -43,7 +43,7 @@ void enableStickyNoteAnnotationMode() { {% endhighlight %} {% endtabs %} -Similarly, refer to following code to disable the stickyNote annotation mode. +Similarly, refer to the following code to disable the stickyNote annotation mode. {% tabs %} {% highlight dart %} @@ -56,7 +56,7 @@ void disableAnnotationMode() { {% endhighlight %} {% endtabs %} -### Add sticky note annotation programmatically +### Add Sticky Note Annotation Programmatically You can create and add a sticky note annotation to a PDF document programmatically using the [addAnnotation](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/addAnnotation.html) method of the [PdfViewerController](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController-class.html). The following example explains how to create a sticky note with a comment icon and add it to the first page of a PDF document. @@ -86,7 +86,7 @@ void addStickyNoteAnnotation() { {% endhighlight %} {% endtabs %} -## Sticky note annotation settings +## Sticky Note Annotation Settings In the sticky note annotation mode, the annotation will be added with a default appearance. You can modify the annotation after it has been added to the pages. However, if you need to define the appearance before adding sticky note annotations to the document, you can change its default settings using the [PdfViewerController.annotationSettings.stickyNote](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfAnnotationSettings/stickyNote.html). For that, you need to obtain the default sticky note annotation settings. @@ -103,22 +103,22 @@ void customizeDefaultStickyNoteSettings() { // Modify the default properties. stickyNoteSettings.icon = PdfStickyNoteIcon.comment; // Set the default icon to Comment. - stickyNoteSettings.color = Colors.yellow; //Stroke color + stickyNoteSettings.color = Colors.yellow; // Stroke color stickyNoteSettings.opacity = 0.75; // 75% Opacity } {% endhighlight %} {% endtabs %} -## Edit the selected sticky note annotation +## Edit the Selected Sticky Note Annotation -### Edit the text using UI interaction +### Edit the Text Using UI Interaction When you double-tap the selected sticky note, the text editor opens. Edit the text and click "Save" to modify the text. ![Sticky note editing](images/annotations/sticky-notes-edit.gif) -### Edit sticky note properties programmatically +### Edit Sticky Note Properties Programmatically Edit the properties of the selected sticky note annotation programmatically by accessing the selected annotation instance. The selected annotation instance may be obtained from the [onAnnotationSelected](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onAnnotationSelected.html) callback. The following example shows how to edit the text and icon of the selected sticky note annotation. Similarly, you can modify the other properties. diff --git a/Flutter/pdf-viewer/text-markup.md b/Flutter/pdf-viewer/text-markup.md index 61c813ba2..032f5a1cb 100644 --- a/Flutter/pdf-viewer/text-markup.md +++ b/Flutter/pdf-viewer/text-markup.md @@ -9,31 +9,31 @@ documentation: ug # Text Markup Annotations in Flutter PDF Viewer Widget (SfPdfViewer) -The text markup annotations feature of `SfPdfViewer` allows you to add, remove, and modify text markups in the PDF document. This is useful for making corrections or emphasizing important texts in the document. This section will go through the various types and functions available in PDF Viewer for working with text markup annotations. +The text markup annotations feature of `SfPdfViewer` allows you to add, remove, and modify text markups in the PDF document. This is useful for making corrections or emphasizing important texts in the document. This section will go through the various types and functions available in the PDF Viewer for working with text markup annotations. -## Types of text markups +## Types of Text Markups -The following text markup annotation types are now available in the PDF Viewer. -1. Highlight. -2. Squiggly. -3. Strikethrough. -4. Underline. +The following text markup annotation types are now available in the PDF Viewer: +1. Highlight +2. Squiggly +3. Strikethrough +4. Underline -## Add text markups +## Add Text Markups This section will go through how to add text markup annotations to a PDF document interactively and programmatically. -### Add text markups from annotation mode +### Add Text Markups from Annotation Mode -You can add text markup annotations to a PDF document by touching (or mouse down) and dragging using the `annotationMode` property of the PdfViewerController. The following steps explain how to add text markup annotation on a text in a PDF. +You can add text markup annotations to a PDF document by touching (or mouse down) and dragging using the [annotationMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationMode.html) property of the PdfViewerController. The following steps explain how to add a text markup annotation on a text in a PDF: -1. Set the AnnotationMode property of the SfPdfViewer to any text markups (say Highlight). It activates the highlight annotation mode on the control. -2. Place your finger (or mouse) on the text in the PDF document where you want to start adding the text markup. -3. Drag the finger (or cursor) across the text to select. -4. Complete adding the text markup to the selected text by releasing the finger (or cursor). -5. Repeat steps 2-4 to add multiple text markups on other areas during the annotation mode. -6. Once you have done this, set the AnnotationMode to None. It will disable the annotation mode. -7. You can later select and edit the annotations if required. +1. Set the [annotationMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationMode.html) property of the SfPdfViewer to any text markups (e.g., `highlight`). It activates the highlight annotation mode on the control. +2. Place your finger (or mouse) on the text in the PDF document where you want to start adding the text markup. +3. Drag the finger (or cursor) across the text to select it. +4. Complete adding the text markup to the selected text by releasing the finger (or cursor). +5. Repeat steps 2-4 to add multiple text markups in other areas during the annotation mode. +6. Once you have done this, set the [annotationMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationMode.html) to `none`. It will disable annotation mode. +7. You can later select and edit the annotations if required. The following code explains how to enable the strikethrough annotation mode. Similarly, you can change the annotation mode to add other text markups. @@ -48,7 +48,7 @@ void enableStrikethroughAnnotationMode() { {% endhighlight %} {% endtabs %} -Similarly, refer to following code to disable the strikethrough annotation mode. +Similarly, refer to the following code to disable the strikethrough annotation mode. {% tabs %} {% highlight dart %} @@ -61,9 +61,8 @@ void disableAnnotationMode() { {% endhighlight %} {% endtabs %} -### Add text markups from text selection +### Add Text Markups from Text Selection -Text markups can be added to a PDF document using the text selection without enabling the `annotationMode`. Select the text you want in a PDF document, and a context menu with the text markup options will appear after you complete your selection. You can select any text markup options to add annotation to a text in the PDF document. - -![Text selection context menu in Flutter PDF Viewer.](images/annotations/flutter-pdf-viewer-text-selection-context-menu.png) +Text markups can be added to a PDF document using text selection without enabling the [annotationMode](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationMode.html). Select the text you want in a PDF document, and a context menu with the text markup options will appear after you complete your selection. You can select any text markup options to add an annotation to a text in the PDF document. +![Text selection context menu in Flutter PDF Viewer.](images/annotations/flutter-pdf-viewer-text-selection-context-menu.png) \ No newline at end of file diff --git a/Flutter/pdf-viewer/text-search.md b/Flutter/pdf-viewer/text-search.md index 546cb5296..b80bedda3 100644 --- a/Flutter/pdf-viewer/text-search.md +++ b/Flutter/pdf-viewer/text-search.md @@ -7,19 +7,19 @@ control: SfPdfViewer documentation: ug --- -# Text search in Flutter PDF Viewer (SfPdfViewer) +# Text Search in Flutter PDF Viewer (SfPdfViewer) -The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) allows you to find texts in the PDF document and navigate to all its occurrences. +The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) allows you to find text in the PDF document and navigate to all its occurrences. -## Initiate text search and retrieve results +## Initiate Text Search and Retrieve Results -The [searchText](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/searchText.html) controller method is used to initiate the text search and it takes the text to be searched and [TextSearchOption](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/TextSearchOption.html) as parameters. This method searches for the text and highlights all the instances of the texts in the document and returns the [PdfTextSearchResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) object holding the result values such as total instance count, current highlighted instance index, and more. The [PdfTextSearchResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) object will also help you to navigate to the different searched text instances available and cancel the search operation as well. +The [searchText](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/searchText.html) controller method is used to initiate the text search and it takes the text to be searched and [TextSearchOption](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/TextSearchOption.html) as parameters. This method searches for the text, highlights all the instances of the text in the document, and returns the [PdfTextSearchResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) object holding the result values such as total instance count, current highlighted instance index, and more. The [PdfTextSearchResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) object will also help you navigate to the different searched text instances available and cancel the search operation. -On mobile and desktop platforms, the search will be performed asynchronously and so the results will be returned periodically on a page-by-page basis, which can be retrieved using the `PdfTextSearchResult.addListener` method in the application. +On mobile and desktop platforms, the search will be performed asynchronously, so the results will be returned periodically on a page-by-page basis, which can be retrieved using the `PdfTextSearchResult.addListener` method in the application. -Whereas in the web platform, the search will be performed synchronously and so the result will be returned only after completing the search on all the pages. This is since `isolate` is not supported for the web platform yet. +Whereas on the web platform, the search will be performed synchronously, so the result will be returned only after completing the search on all the pages. This is because `isolate` is not supported for the web platform yet. -To differentiate the highlighted texts, the current text instance highlight color will be dark, while the rest of the instances will be light. The following code example explains how to perform the text search and retrieve the results for the same. +To differentiate the highlighted texts, the current text instance highlight color will be dark, while the rest of the instances will be light. The following code example explains how to perform the text search and retrieve the results. N> Import **'package:syncfusion_flutter_pdf/pdf.dart'** in the Dart code if you use the [TextSearchOption](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/TextSearchOption.html) parameter. @@ -74,9 +74,9 @@ void initState() { {% endhighlight %} {% endtabs %} -## Navigate to the next and previous instance +## Navigate to the Next and Previous Instance -The [nextInstance](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/nextInstance.html) and [previousInstance](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/previousInstance.html) methods in the [PdfSearchTextResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) class help you to navigate to the next and previous search text instance in the PDF document. The following code example explains the same. +The [nextInstance](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/nextInstance.html) and [previousInstance](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/previousInstance.html) methods in the [PdfTextSearchResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) class help you to navigate to the next and previous search text instances in the PDF document. The following code example explains the same. {% tabs %} {% highlight dart hl_lines="44 56" %} @@ -150,9 +150,9 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Cancel text search +## Cancel Text Search -The [clear](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/clear.html) method in the [PdfSearchTextResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) class is used to cancel the text search operation. When the text search is in progress, this method can be used to cancel the same and clear all the highlighted texts in the `SfPdfViewer`. The following code example explains the same +The [clear](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/clear.html) method in the [PdfTextSearchResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) class is used to cancel the text search operation. When the text search is in progress, this method can be used to cancel the same and clear all the highlighted texts in the `SfPdfViewer`. The following code example explains the same. {% tabs %} {% highlight dart hl_lines="45" %} @@ -216,9 +216,9 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## Customize the search text highlight color +## Customize the Search Text Highlight Color -The colors in which the current instance and other instances are highlighted can be customized with the help of [currentSearchTextHighlightColor](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/currentSearchTextHighlightColor.html) and [otherSearchTextHighlightColor](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/otherSearchTextHighlightColor.html) property. The default highlight color is **Orange** [Color(0xFFE56E00)] and the current instance highlight color opacity (w.r.t this property) will be higher than the other instances. By default, the current instance highlight color opacity will be 60% and the other instances color opacity will be 30%. +The colors in which the current instance and other instances are highlighted can be customized with the help of [currentSearchTextHighlightColor](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/currentSearchTextHighlightColor.html) and [otherSearchTextHighlightColor](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/otherSearchTextHighlightColor.html) property. The default highlight color is **Orange** [Color(0xFFE56E00)] and the current instance highlight color opacity (with respect to this property) will be higher than the other instances. By default, the current instance highlight color opacity will be 60% and the other instances color opacity will be 30%. The following code example explains how to customize the search text highlight color. @@ -273,9 +273,9 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## How to identify if there is no instance found for the text being searched? +## How to Identify if There is No Instance Found for the Text Being Searched? -The [totalInstanceCount](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/totalInstanceCount.html) property in the [PdfSearchTextResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) object can be used to identify if no instance of the searched text is found in the PDF document. That is, if the [totalInstanceCount](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/totalInstanceCount.html) returns value 0, then there is no matching instance found for the searched text. The following code explains the same. +The [totalInstanceCount](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/totalInstanceCount.html) property in the [PdfTextSearchResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) object can be used to identify if no instance of the searched text is found in the PDF document. That is, if [totalInstanceCount](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/totalInstanceCount.html) returns value 0, then there is no matching instance found for the searched text. The following code explains the same. {% tabs %} {% highlight dart hl_lines="25 26 27 28 29 30 31 32 33 34 35 36" %} @@ -328,9 +328,9 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## How to identify if a complete cycle of text search is completed? +## How to Identify if a Complete Cycle of Text Search is Completed? -The [totalInstanceCount](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/totalInstanceCount.html) and [currentInstanceIndex](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/currentInstanceIndex.html) properties in the [PdfSearchTextResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) object can be used to identify if a complete cycle of text search is completed in the PDF document. That is, when the [nextInstance](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/nextInstance.html) method is called, you can check if the `currentInstanceIndex` equals the `totalInstanceCount`, then it can be considered that a complete cycle of text search is completed. The following code example explains the same. +The [totalInstanceCount](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/totalInstanceCount.html) and [currentInstanceIndex](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/currentInstanceIndex.html) properties in the [PdfTextSearchResult](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult-class.html) object can be used to identify if a complete cycle of text search is completed in the PDF document. That is, when the [nextInstance](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSearchResult/nextInstance.html) method is called, you can check if the `currentInstanceIndex` equals the `totalInstanceCount`, then it can be considered that a complete cycle of text search is completed. The following code example explains the same. {% tabs %} {% highlight dart hl_lines="71 72 73 74 75" %} @@ -423,17 +423,17 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## How to create and display a custom search toolbar with the search features? +## How to Create and Display a Custom Search Toolbar with the Search Features? -With the options available in the `SfPdfViewer` text search, you can easily create and display a custom search toolbar with the search features. The following code example explains the same. +With the options available in the `SfPdfViewer` text search, you can easily create and display a custom search toolbar with the search features. The following code example explains the same. -In this example, initially the main toolbar or AppBar will be displayed with a search button and on pressing that, a custom search toolbar will be displayed with the following options, +In this example, initially the main toolbar or AppBar will be displayed with a search button, and on pressing that, a custom search toolbar will be displayed with the following options: * **Back button** - To close the search toolbar. * **Text field entry** - To enter the text to be searched in the document. * **Close button** - To cancel the search progress. * **Busy indicator** - To indicate that the search is in progress. This will be visible only on mobile and desktop platforms. -* **Instances information text** - Displays the current instance index and total instances count of the searched text. +* **Instances information text** - Displays the current instance index and total instances count of the searched text. * **Previous instance search navigation button** - To navigate to the previous match instance. * **Next instance search navigation button** - To navigate to the next match instance. diff --git a/Flutter/pdf-viewer/text-selection.md b/Flutter/pdf-viewer/text-selection.md index e35a5ceb6..471032d9f 100644 --- a/Flutter/pdf-viewer/text-selection.md +++ b/Flutter/pdf-viewer/text-selection.md @@ -7,17 +7,17 @@ control: SfPdfViewer documentation: ug --- -# Text selection in Flutter PDF Viewer (SfPdfViewer) +# Text Selection in Flutter PDF Viewer (SfPdfViewer) -On a touch device, the [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) allows you to select a text in the PDF page by long pressing on it, which in turn displays the selection handles or bubbles at the top-left and bottom-right corners of its bounds. Then, you can use the left handle to select the text at the left and top, and the right handle to select the text at the right and bottom directions. +On a touch device, the [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) allows you to select text in the PDF page by long pressing on it, which in turn displays the selection handles or bubbles at the top-left and bottom-right corners of its bounds. You can then use the left handle to select text at the left and top, and the right handle to select text at the right and bottom directions. -And on a desktop web browser, the text selection can also be performed using mouse dragging with the [`selection`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfInteractionMode.html) interaction mode enabled. +On a desktop web browser, text selection can also be performed using mouse dragging with the [`selection`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfInteractionMode.html) interaction mode enabled. -N> The images in the document will not be selected and, the multiple-page text selection is not supported for now. +N> Images in the document will not be selected, and multiple-page text selection is not supported for now. -## Enable or disable text selection +## Enable or Disable Text Selection -You can enable or disable the text selection in the PDF page using the [enableTextSelection](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/enableTextSelection.html) property. The following code example explains the same. +You can enable or disable text selection in the PDF page using the [enableTextSelection](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/enableTextSelection.html) property. The following code example explains the same. {% tabs %} {% highlight dart hl_lines="6" %} @@ -33,9 +33,9 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -N> On a desktop web browser, this `enableTextSelection` property will have no effect on the [`pan`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfInteractionMode.html) interaction mode. +N> On a desktop web browser, the `enableTextSelection` property will have no effect on the [`pan`](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfInteractionMode.html) interaction mode. -## Customize the text selection and its handle color +## Customize the Text Selection and Its Handle Color The [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) allows you to customize the color used for text selection and its handle based on your requirements. The properties [selectionColor](https://api.flutter.dev/flutter/material/TextSelectionThemeData/selectionColor.html) and [selectionHandleColor](https://api.flutter.dev/flutter/material/TextSelectionThemeData/selectionHandleColor.html) of the [TextSelectionThemeData](https://api.flutter.dev/flutter/material/TextSelectionThemeData-class.html) class can be used to customize them. The following code example explains the same. @@ -100,9 +100,9 @@ Widget build(BuildContext context) { The `SfPdfViewer` text selection supports the [PdfTextSelectionChangedCallback](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSelectionChangedCallback.html) to notify the text selection changes. -### Text selection changed callback +### Text Selection Changed Callback -The [onTextSelectionChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onTextSelectionChanged.html) callback triggers when the text is selected or deselected in the SfPdfViewer. The [PdfTextSelectionChangedDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSelectionChangedDetails-class.html) will hold the [globalSelectedRegion](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSelectionChangedDetails/globalSelectedRegion.html) representing the global bounds information of the selected text region and the [selectedText](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSelectionChangedDetails/selectedText.html) representing the selected text value. The following code example explains the same. +The [onTextSelectionChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onTextSelectionChanged.html) callback triggers when the text is selected or deselected in the SfPdfViewer. The [PdfTextSelectionChangedDetails](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSelectionChangedDetails-class.html) holds the [globalSelectedRegion](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSelectionChangedDetails/globalSelectedRegion.html) representing the global bounds information of the selected text region and the [selectedText](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfTextSelectionChangedDetails/selectedText.html) representing the selected text value. The following code example explains the same. {% tabs %} {% highlight dart hl_lines="9 10 11 12 13" %} @@ -126,7 +126,7 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## How to get the selected text lines in the PDF viewer? +## How to Get the Selected Text Lines in the PDF Viewer? Using the [getSelectedTextLines](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewerState/getSelectedTextLines.html) method, you can get the selected text lines in the PDF viewer. The following code example explains the same. @@ -169,13 +169,13 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## How to create and display a customized text selection context menu with copy and text markup options to retrieve the selected text? +## How to Create and Display a Customized Text Selection Context Menu with Copy and Text Markup Options to Retrieve the Selected Text? With the options available in `SfPdfViewer` text selection, you can easily create and display a customized text selection context menu with various options such as **Copy, Highlight, Underline, Strikethrough, and Squiggly**, and perform operations with them. The following code example explains how to implement this functionality. In this example, we use the [OverlayEntry](https://api.flutter.dev/flutter/widgets/OverlayEntry-class.html) widget to create the customized context menu and add buttons for various options, such as Copy, Highlight, Underline, Strikethrough, and Squiggly. We are calling the method to display the customized context menu in the [onTextSelectionChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onTextSelectionChanged.html) callback. Whenever one of these options is pressed, the corresponding action is performed on the selected text. -* For the copy operation, the selected text value is retrieved from the'selectedText` property of the [onTextSelectionChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onTextSelectionChanged.html) callback details. We then copy the text to the clipboard using the [Clipboard.setData](https://api.flutter.dev/flutter/services/Clipboard/setData.html) method. +* For the copy operation, the selected text value is retrieved from the `selectedText` property of the [onTextSelectionChanged](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onTextSelectionChanged.html) callback details. We then copy the text to the clipboard using the [Clipboard.setData](https://api.flutter.dev/flutter/services/Clipboard/setData.html) method. The text selection is cleared after the Copy operation by calling the [clearSelection](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/clearSelection.html) controller method. * For the text markup options, we retrieve the selected text lines using the [getSelectedTextLines](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewerState/getSelectedTextLines.html) method and add the respective annotations using the [addAnnotation](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/addAnnotation.html) method on the `PdfViewerController`. diff --git a/Flutter/pdf-viewer/ui-customization.md b/Flutter/pdf-viewer/ui-customization.md index 8ea5b7940..327186956 100644 --- a/Flutter/pdf-viewer/ui-customization.md +++ b/Flutter/pdf-viewer/ui-customization.md @@ -1,89 +1,89 @@ ---- -layout: post -title: UI Customization in Flutter PDF Viewer | Syncfusion -description: Learn here all about the UI customization options in Syncfusion® Flutter PDF Viewer (SfPdfViewer) widget and more. -platform: flutter -control: SfPdfViewer -documentation: ug ---- - -# UI Customization in Flutter PDF Viewer (SfPdfViewer) - -This section walks you through the UI customization options supported in the [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) widget. - -## Customize the space being displayed between the PDF pages - -By default, the `SfPdfViewer` displays the spacing between the PDF pages with the value of **4 pixels**. You can customize the space being displayed using the [pageSpacing](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/pageSpacing.html) property. The following code example explains the same. - -{% tabs %} -{% highlight dart hl_lines="6" %} - -@override -Widget build(BuildContext context) { - return Scaffold( - body: SfPdfViewer.network( - 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', - pageSpacing: 2)); -} - -{% endhighlight %} -{% endtabs %} - -## Customize the visibility of scroll head and scroll status - -By default, the `SfPdfViewer` displays the scroll head and scroll status. You can customize the visibility of these items using the [canShowScrollHead](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowScrollHead.html) and [canShowScrollStatus](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowScrollStatus.html) properties. The following code example explains the same. - -{% tabs %} -{% highlight dart hl_lines="6 7" %} - -@override -Widget build(BuildContext context) { - return Scaffold( - body: SfPdfViewer.network( - 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', - canShowScrollHead: false, - canShowScrollStatus: false)); -} - -{% endhighlight %} -{% endtabs %} - -N> On a desktop or mobile web browser, this `canShowScrollHead` property will have no effect since the scroll head will not be displayed there. - -## Customize the visibility of page navigation dialog - -By default, the page navigation dialog will be displayed when the scroll head is tapped. You can customize the visibility of the page navigation dialog using the [canShowPaginationDialog](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowPaginationDialog.html) property. The following code example explains the same. - -{% tabs %} -{% highlight dart hl_lines="6" %} - -@override -Widget build(BuildContext context) { - return Scaffold( - body: SfPdfViewer.network( - 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', - canShowPaginationDialog: false)); -} - -{% endhighlight %} -{% endtabs %} - -N> On a desktop or mobile web browser, this `canShowPaginationDialog` property will have no effect since the pagination dialog will not be displayed there. - -## Customize the visibility of page loading busy indicator - -By default, the `SfPdfViewer` displays the page loading busy indicator. You can customize the visibility of this using the [canShowPageLoadingIndicator](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowPageLoadingIndicator.html) property. The following code example explains the same. - -{% tabs %} -{% highlight dart hl_lines="6" %} - -@override -Widget build(BuildContext context) { - return Scaffold( - body: SfPdfViewer.network( - 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', - canShowPageLoadingIndicator: false)); -} - -{% endhighlight %} +--- +layout: post +title: UI Customization in Flutter PDF Viewer | Syncfusion +description: Learn here all about the UI customization options in Syncfusion® Flutter PDF Viewer (SfPdfViewer) widget and more. +platform: flutter +control: SfPdfViewer +documentation: ug +--- + +# UI Customization in Flutter PDF Viewer (SfPdfViewer) + +This section walks you through the UI customization options supported in the [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) widget. + +## Customize the Space Displayed Between the PDF Pages + +By default, the `SfPdfViewer` displays spacing between the PDF pages with a value of **4 pixels**. You can customize the space being displayed using the [pageSpacing](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/pageSpacing.html) property. The following code example explains the same. + +{% tabs %} +{% highlight dart hl_lines="6" %} + +@override +Widget build(BuildContext context) { + return Scaffold( + body: SfPdfViewer.network( + 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', + pageSpacing: 2)); +} + +{% endhighlight %} +{% endtabs %} + +## Customize the Visibility of Scroll Head and Scroll Status + +By default, the `SfPdfViewer` displays the scroll head and scroll status. You can customize the visibility of these items using the [canShowScrollHead](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowScrollHead.html) and [canShowScrollStatus](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowScrollStatus.html) properties. The following code example explains the same. + +{% tabs %} +{% highlight dart hl_lines="6 7" %} + +@override +Widget build(BuildContext context) { + return Scaffold( + body: SfPdfViewer.network( + 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', + canShowScrollHead: false, + canShowScrollStatus: false)); +} + +{% endhighlight %} +{% endtabs %} + +N> On a desktop or mobile web browser, this `canShowScrollHead` property will have no effect since the scroll head will not be displayed there. + +## Customize the Visibility of Page Navigation Dialog + +By default, the page navigation dialog will be displayed when the scroll head is tapped. You can customize the visibility of the page navigation dialog using the [canShowPaginationDialog](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowPaginationDialog.html) property. The following code example explains the same. + +{% tabs %} +{% highlight dart hl_lines="6" %} + +@override +Widget build(BuildContext context) { + return Scaffold( + body: SfPdfViewer.network( + 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', + canShowPaginationDialog: false)); +} + +{% endhighlight %} +{% endtabs %} + +N> On a desktop or mobile web browser, this `canShowPaginationDialog` property will have no effect since the pagination dialog will not be displayed there. + +## Customize the Visibility of Page Loading Busy Indicator + +By default, the `SfPdfViewer` displays the page loading busy indicator. You can customize the visibility of this using the [canShowPageLoadingIndicator](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowPageLoadingIndicator.html) property. The following code example explains the same. + +{% tabs %} +{% highlight dart hl_lines="6" %} + +@override +Widget build(BuildContext context) { + return Scaffold( + body: SfPdfViewer.network( + 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', + canShowPageLoadingIndicator: false)); +} + +{% endhighlight %} {% endtabs %} \ No newline at end of file diff --git a/Flutter/pdf-viewer/undo-redo.md b/Flutter/pdf-viewer/undo-redo.md index 236595ced..1583d77a6 100644 --- a/Flutter/pdf-viewer/undo-redo.md +++ b/Flutter/pdf-viewer/undo-redo.md @@ -7,7 +7,7 @@ control: SfPdfViewer documentation: ug --- -# Undo and redo annotations in the Flutter PDF Viewer (SfPdfViewer) +# Undo and Redo Annotations in the Flutter PDF Viewer (SfPdfViewer) If you performed any undesired actions when adding, removing, or editing annotations, you can undo and redo the action to restore the previous state. This section will go through how to undo and redo the changes made to the annotations. @@ -15,7 +15,7 @@ For desktop platforms such as Windows, macOS, and desktop web, you can use the f - + diff --git a/Flutter/pdf-viewer/viewing-password-protected-pdf-files.md b/Flutter/pdf-viewer/viewing-password-protected-pdf-files.md index 78c277d39..0e5f8daf9 100644 --- a/Flutter/pdf-viewer/viewing-password-protected-pdf-files.md +++ b/Flutter/pdf-viewer/viewing-password-protected-pdf-files.md @@ -7,13 +7,13 @@ control: SfPdfViewer documentation: ug --- -# Viewing password-protected PDF's in Flutter PDF Viewer (SfPdfViewer) +# Viewing Password-Protected PDFs in Flutter PDF Viewer (SfPdfViewer) -To load a password-protected document without a password or with an invalid password in [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) using the [password](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/password.html) property. The default password dialog will be displayed. +To load a password-protected document without a password or with an invalid password in [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html), use the [password](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/password.html) property. The default password dialog will be displayed. ![Password dialog](images/password-dialog/password-dialog.png) -## Customize the visibility of password dialog +## Customize the Visibility of Password Dialog The password-protected document can be loaded by providing the password in the [password](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/password.html) property of SfPdfViewer. The [canShowPasswordDialog](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowPasswordDialog.html) property allows the user to customize the password dialog visibility. The following code example explains the same. @@ -33,10 +33,9 @@ Widget build(BuildContext context) { {% endhighlight %} {% endtabs %} -## How to create and display a Customized Password Dialog? +## How to Create and Display a Customized Password Dialog? -The `SfPdfViewer` library allows you to create and display a customized password dialog. The following code example explains the same. -In this example, We have disabled the built-in password dialog by setting the false to the [canShowPasswordDialog](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowPasswordDialog.html) property and creating the customized password dialog with the [AlertDialog](https://api.flutter.dev/flutter/material/AlertDialog-class.html) widget. Whenever the `password` is empty or incorrect, the [onDocumentLoadFailed](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onDocumentLoadFailed.html) callback is triggered, used this callback to display the customized password dialog. +The `SfPdfViewer` library allows you to create and display a customized password dialog. The following code example explains the same. In this example, we have disabled the built-in password dialog by setting the [canShowPasswordDialog](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowPasswordDialog.html) property to false and created the customized password dialog with the [AlertDialog](https://api.flutter.dev/flutter/material/AlertDialog-class.html) widget. Whenever the `password` is empty or incorrect, the [onDocumentLoadFailed](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onDocumentLoadFailed.html) callback is triggered, and this callback is used to display the customized password dialog. {% tabs %} {% highlight Dart %} @@ -245,7 +244,7 @@ class _CustomPasswordDialogState extends State { }); } - ///Close the password dialog + /// Close the password dialog void _closePasswordDialog() { Navigator.pop(context, 'Cancel'); _hasPasswordDialog = false; @@ -253,7 +252,7 @@ class _CustomPasswordDialogState extends State { _textFieldController.clear(); } - /// Validates the password entered in text field. + /// Validates the password entered in the text field. void _handlePasswordValidation(String value) { setState(() { _password = value; From 19ea338bd295db3c62bf967a8e0e2d81dbe3111c Mon Sep 17 00:00:00 2001 From: immankumarsync Date: Tue, 3 Jun 2025 11:40:42 +0530 Subject: [PATCH 2/2] FLUT-959344: Check grammar for Flutter PDF viewer files --- Flutter/pdf-viewer/open-a-document-from-url.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Flutter/pdf-viewer/open-a-document-from-url.md b/Flutter/pdf-viewer/open-a-document-from-url.md index df32b16f3..c637d08c6 100644 --- a/Flutter/pdf-viewer/open-a-document-from-url.md +++ b/Flutter/pdf-viewer/open-a-document-from-url.md @@ -1,7 +1,7 @@ --- layout: post title: Open a Document From URL in Flutter PDF Viewer | Syncfusion -description: Learn here about opening a PDF document from URL in Syncfusion® Flutter PDF Viewer widget (SfPdfViewer). +description: Learn here about opening a PDF document from a URL in the Syncfusion® Flutter PDF Viewer widget (SfPdfViewer). platform: flutter control: SfPdfViewer documentation: ug @@ -35,7 +35,7 @@ N> Due to CORS security restrictions in a web application, some PDFs obtained fr This issue can be resolved by configuring the CORS settings on the requested server or by disabling the security settings in **chrome.dart** as mentioned in the steps below: -Go to **flutter\bin\cache** and remove a file named: **flutter_tools.stamp**. -Go to **flutter\packages\flutter_tools\lib\src\web** and open the file **chrome.dart**. -Find **'--disable-extensions'**. -Add **'--disable-web-security'**. +1. Go to **flutter\bin\cache** and remove a file named: **flutter_tools.stamp**. +2. Go to **flutter\packages\flutter_tools\lib\src\web** and open the file **chrome.dart**. +3. Find **'--disable-extensions'**. +4. Add **'--disable-web-security'**.
Action & Shortcut keysAction & Shortcut Keys Windows macOS