Skip to content

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

immankumarsync
Copy link
Collaborator

Description

  • Added the missing public APIs in the UG documentation
  • Added code snippet at applicable areas
  • Corrected the incorrect highlighting in the code snippet

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: FLUT-967617-pdfviewer

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: FLUT-967617-pdfviewer
Technical Error(s): 0
Spelling Error(s): 1
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 2
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0


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`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please cross check the typo errors
image

@@ -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).
Copy link
Collaborator

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.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here linking is missed. If it is purposefully ignored means ok.
image

{% highlight dart %}

void setDefaultAuthor() {
Copy link
Collaborator

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

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.

3 participants