-
Notifications
You must be signed in to change notification settings - Fork 43
FLUT-967617: Updated PDF Viewer UG with public APIs #1326
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
base: master
Are you sure you want to change the base?
Conversation
Build Status: INPROGRESS 🔃 |
CI Status: FAILURE ❌ |
|
||
The [controller](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/controller.html) property in the SfPdfViewer widget allows you to interact with the PDF document programmatically using the [PdfViewerController](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController-class.html). This controller provides access to various methods and properties such as [jumpToPage](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/jumpToPage.html), [zoomLevel](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/zoomLevel.html), [pageCount](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/pageCount.html), and annotation management. | ||
|
||
he following code explains how to initialize, attach, and dispose the `PdfViewerController`. |
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.
@@ -88,23 +88,26 @@ void addStickyNoteAnnotation() { | |||
|
|||
## 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. | |||
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). |
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.
Try to avoid long text linking [PdfViewerController.annotationSettings.stickyNote]. You may explain this hierarchy in the code example.
You can use the last term for linking and append with the type. For example
stickyNote.
Check the similar case in all the places.
@@ -63,7 +63,12 @@ Widget build(BuildContext context) { | |||
|
|||
### 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. | |||
The [selector](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfAnnotationSettings/selector.html) property of the [annotationSettings](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/PdfViewerController/annotationSettings.html) property of `PdfViewerController` allows you to customize the default selector color. |
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.
{% highlight dart %} | ||
|
||
void setDefaultAuthor() { |
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.
// Set the default author name for all annotations added after this setting is applie
_pdfViewerController.annotationSettings.author
The code explanation is large and not conveying the exact meaning correctly. This can be improved - Simple and informative.
Cross check whether any long explanations in other places also and address the same
Description