Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLUT-889763-[documentation][flutter]: Revamp the Flutter PDF viewer UG #872

Open
wants to merge 7 commits into
base: development
Choose a base branch
from

Conversation

KrithigaPerumal
Copy link
Contributor

Description

Modified documentation content and added the content to the new sections.

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: FLUT-889763-flutter-text-selection

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: FLUT-889763-flutter-text-selection
Technical Error(s): 0
Spelling Error(s): 1
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 6
File Path Error(s): 1
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: FLUT-889763-flutter-text-selection

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: FLUT-889763-flutter-text-selection
Technical Error(s): 0
Spelling Error(s): 1
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 6
File Path Error(s): 1
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0

@@ -0,0 +1,80 @@
---
layout: post
title: Document Load Events in Flutter PDF Viewer (SfPdfViewer) | Syncfusion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document Load Callbacks in Flutter PDF Viewer (SfPdfViewer) | Syncfusion

@@ -0,0 +1,88 @@
---
layout: post
title: UI Customization in Flutter PDF Viewer widget (SfPdfViewer) | Syncfusion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to change the title

@@ -0,0 +1,267 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a section to view the password protected files. Why a new section is needed?

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: FLUT-889763-flutter-text-selection

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: FLUT-889763-flutter-text-selection
Image Alt Text Error(s): 0
Image Size Error(s): 1
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 20
File Path Error(s): 1
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INQUEUE 🕒
Build Location: FLUT-889763-flutter-text-selection

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: FLUT-889763-flutter-text-selection

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: FLUT-889763-flutter-text-selection
Image Alt Text Error(s): 0
Image Size Error(s): 1
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 21
File Path Error(s): 1
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: FLUT-889763-flutter-text-selection

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: FLUT-889763-flutter-text-selection
Image Alt Text Error(s): 0
Image Size Error(s): 1
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 21
File Path Error(s): 2
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0


## Add annotations to a PDF document

This section will go through how to add annotations to a PDF document 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` 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.
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/search.html?q=addAnnotation) method of the [PdfViewerController](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController-class.html) 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add proper link

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added proper link for add annotation method.

@@ -90,7 +90,7 @@ void removeFirstAnnotation() {

### Remove all the annotations

You can programmatically remove all the annotations from a document by calling the `removeAllAnnotations` 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.
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](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/pageNumber.html) 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the link for pageNumber

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the link for the pageNumber API.

@@ -450,7 +450,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 the form field data in the PDF document. The optional [pageNumber](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/pageNumber.html) parameter can be used to clear the form field data on a specific page. By default, the [pageNumber](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/pageNumber.html) parameter is 0. Refer to the following code example.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the link for both pageNumber optional parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the link for both pageNumber optional parameters.

@@ -672,7 +672,7 @@ Widget build(BuildContext context) {

If you performed undesired actions when editing the form fields, you can undo and redo the action to restore the previous state.

The undo and redo operations are performed by assigning the `UndoHistoryController` instance to the `undoController` property of the `SfPdfViewer`. The UndoHistoryController class contains the `undo` and `redo` methods to perform the same, respectively. The `canUndo` and `canRedo` properties are used to check whether the undo and redo operations can be performed or not, respectively. The following code example illustrates how to perform the form filling undo and redo operations programmatically with the `SfPdfViewer`.
The undo and redo operations are performed by assigning the `UndoHistoryController` instance to the [undoController](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/undoController.html) property of the `SfPdfViewer`. The UndoHistoryController class contains the `undo` and `redo` methods to perform the same, respectively. The `canUndo` and `canRedo` properties are used to check whether the undo and redo operations can be performed or not, respectively. The following code example illustrates how to perform the form filling undo and redo operations programmatically with the `SfPdfViewer`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add API links for undo, redo, canUndo and canRedo APIs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added proper API links for undo, redo, canUndo and canRedo APIs.

---
layout: post
title: Document Load Callbacks in Flutter PDF Viewer (SfPdfViewer) | Syncfusion
description: Learn here all about events that notifies whether the document has been loaded or failed to get loaded in the Syncfusion Flutter PDF Viewer (SfPdfViewer).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Events -> callbacks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the keyword "events" to "callbacks".

@@ -0,0 +1,76 @@
## 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add API link for initialPageNumber

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the API link for initialPageNumber.

{% 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add API link for initialPageNumber

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the API link for initialPageNumber.

@@ -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](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfPageChangedDetails/oldPageNumber.html), [newPageNumber](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfPageChangedDetails/newPageNumber.html), [isFirstPage](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/search.html?q=isFirstPage) and [isLastPage](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfPageChangedDetails/isLastPage.html) values. The following code example explains the same.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add proper API link for isFirstPage property

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added proper API link for isFirstPage property

@@ -31,7 +31,7 @@ For desktop platforms such as Windows, macOS, and desktop web, you can use the f
</tr>
</table>

You can perform the undo and redo operations in the `SfPdfViewer` by assigning the `UndoHistoryController` instance to the `undoController` property of the `SfPdfViewer`. The UndoHistoryController class contains the `undo` and `redo` methods to perform the undo and redo operations, respectively. The `canUndo` and `canRedo` properties check whether the undo and redo operations can be performed, respectively. The following code example illustrates how to perform the undo and redo operations programmatically in the `SfPdfViewer` with the help of the UndoHistoryController class.
You can perform the undo and redo operations in the `SfPdfViewer` by assigning the `UndoHistoryController` instance to the [undoController](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/undoController.html) property of the `SfPdfViewer`. The UndoHistoryController class contains the `undo` and `redo` methods to perform the undo and redo operations, respectively. The `canUndo` and `canRedo` properties check whether the undo and redo operations can be performed, respectively. The following code example illustrates how to perform the undo and redo operations programmatically in the `SfPdfViewer` with the help of the UndoHistoryController class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add API links for undo, redo, canUndo an canRedo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added API links for undo, redo, canUndo an canRedo.

@Syncfusion-CI
Copy link

Build Status: INPROGRESS 🔃
Build Location: FLUT-889763-flutter-text-selection

@Syncfusion-CI
Copy link

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: FLUT-889763-flutter-text-selection
Image Alt Text Error(s): 0
Image Size Error(s): 1
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 21
File Path Error(s): 2
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INQUEUE 🕒
Build Location: FLUT-889763-flutter-text-selection

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: FLUT-889763-flutter-text-selection

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: FLUT-889763-flutter-text-selection
Image Alt Text Error(s): 0
Image Size Error(s): 1
Image Name Error(s): 0
FT Layout Syntax Error(s): 0
Front matter Error(s): 24
File Path Error(s): 2
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants