-
Notifications
You must be signed in to change notification settings - Fork 38
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
base: development
Are you sure you want to change the base?
Conversation
Build Status: INPROGRESS 🔃 |
CI Status: FAILURE ❌ |
Build Status: INPROGRESS 🔃 |
CI Status: FAILURE ❌ |
@@ -0,0 +1,80 @@ | |||
--- | |||
layout: post | |||
title: Document Load Events in Flutter PDF Viewer (SfPdfViewer) | Syncfusion |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 @@ | |||
--- |
There was a problem hiding this comment.
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?
Build Status: INPROGRESS 🔃 |
CI Status: FAILURE ❌ |
Build Status: INQUEUE 🕒 |
Build Status: INPROGRESS 🔃 |
CI Status: FAILURE ❌ |
Build Status: INPROGRESS 🔃 |
CI Status: FAILURE ❌ |
|
||
## 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add proper link
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Flutter/pdf-viewer/form-filling.md
Outdated
@@ -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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Flutter/pdf-viewer/form-filling.md
Outdated
@@ -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`. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Events -> callbacks
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Flutter/pdf-viewer/undo-redo.md
Outdated
@@ -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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Build Status: INPROGRESS 🔃 |
CI Status: FAILURE ❌ |
Build Status: INQUEUE 🕒 |
Build Status: INPROGRESS 🔃 |
CI Status: FAILURE ❌ |
Description
Modified documentation content and added the content to the new sections.