Skip to content
1 change: 1 addition & 0 deletions Document-Processing-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@
<li><a href="/document-processing/pdf/pdf-viewer/angular/how-to/custom-context-menu">Customize context menu</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/how-to/pagerenderstarted-pagerendercompleted">PageRenderInitiate and PageRenderComplete event</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/how-to/open-bookmark">Open and Close Bookmark pane programmatically</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/how-to/lock-annotation-in-a-document">Locking Annotation in a PDF document</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/how-to/lock-formfield-in-a-document">Locking Form Fields in a PDF document</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/how-to/signatureselect-signatureunselect">SignatureSelect and SignatureUnselect event</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/how-to/download-start-event">Controlling File Downloads</a></li>
Expand Down
64 changes: 0 additions & 64 deletions Document-Processing/PDF/PDF-Viewer/angular/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,70 +170,6 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService,
}
}

{% endhighlight %}
{% highlight ts tabtitle="Server-Backed" %}

import { Component, OnInit } from '@angular/core';
import { LinkAnnotationService, BookmarkViewService, MagnificationService,
ThumbnailViewService,ToolbarService, NavigationService,
TextSearchService, AnnotationService, TextSelectionService,
PrintService
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-container',
// specifies the template string for the PDF Viewer component
template: `<div class="content-wrapper">
<ejs-pdfviewer id="pdfViewer"
[serviceUrl]='service'
[documentPath]='document'
[commandManager]='commandManager'
style="height:640px;display:block">
</ejs-pdfviewer>
</div>`,
providers: [ LinkAnnotationService, BookmarkViewService, MagnificationService,
ThumbnailViewService, ToolbarService, NavigationService,
AnnotationService, TextSearchService, TextSelectionService,
PrintService]
})
export class AppComponent implements OnInit {
public service = 'https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer';
public document = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf';

ngOnInit(): void {
}
public commandManager = {
keyboardCommand: [{
name: 'customCopy',
gesture: {
pdfKeys: PdfKeys.G,
modifierKeys: ModifierKeys.Shift | ModifierKeys.Alt
}
},
{
name: 'customPaste',
gesture: {
pdfKeys: PdfKeys.H,
modifierKeys: ModifierKeys.Shift | ModifierKeys.Alt
}
},
{
name: 'customCut',
gesture: {
pdfKeys: PdfKeys.Z,
modifierKeys: ModifierKeys.Control
}
},
{
name: 'customSelectAll',
gesture: {
pdfKeys: PdfKeys.E,
modifierKeys: ModifierKeys.Control
}
},
]
}
}

{% endhighlight %}
{% endtabs %}

Expand Down
178 changes: 0 additions & 178 deletions Document-Processing/PDF/PDF-Viewer/angular/annotation/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,95 +173,6 @@ export class AppComponent {
}
}

{% endhighlight %}
{% highlight ts tabtitle="Server-Backed" %}

import { Component, ViewChild } from '@angular/core';
import {
PdfViewerComponent,
PdfViewerModule,
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
LinkAnnotationService,
ThumbnailViewService,
BookmarkViewService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PageOrganizerService
} from '@syncfusion/ej2-angular-pdfviewer';

@Component({
selector: 'app-root',
template: `
<div class="content-wrapper">
<div style="display: flex; gap: 8px; margin-bottom: 12px;">
<button (click)="addComment()">Add Comments</button>
<button (click)="addReply()">Add Reply</button>
</div>
<ejs-pdfviewer
#pdfViewer
id="pdfViewer"
[documentPath]="document"
[serviceUrl]="serviceUrl"
style="height:650px;display:block">
</ejs-pdfviewer>
</div>
`,
imports: [PdfViewerModule],
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
LinkAnnotationService,
ThumbnailViewService,
BookmarkViewService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PageOrganizerService
]
})
export class AppComponent {

@ViewChild('pdfViewer')
public pdfViewer!: PdfViewerComponent;

public document: string =
'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf';

public serviceUrl: string = 'YOUR_SERVICE_URL';

public addComment(): void {
const viewer = this.pdfViewer;
if (!viewer) return;
const annot = viewer.annotationCollection?.[0];
if (annot) {
annot.commentType = 'add';
annot.note = 'New Comment';
viewer.annotation.editAnnotation(annot);
console.log(viewer.annotationCollection?.[0]);
}
}

public addReply(): void {
const viewer = this.pdfViewer;
if (!viewer) return;
const annot = viewer.annotationCollection?.[0];
if (annot) {
annot.commentType = 'add';
annot.replyComment = ['Reply Comment'];
viewer.annotation.editAnnotation(annot);
console.log(viewer.annotationCollection?.[0]);
}
}
}

{% endhighlight %}
{% endtabs %}

Expand Down Expand Up @@ -361,95 +272,6 @@ export class AppComponent {
}
}

{% endhighlight %}
{% highlight ts tabtitle="Server-Backed" %}

import { Component, ViewChild } from '@angular/core';
import {
PdfViewerComponent,
PdfViewerModule,
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
LinkAnnotationService,
ThumbnailViewService,
BookmarkViewService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PageOrganizerService
} from '@syncfusion/ej2-angular-pdfviewer';

@Component({
selector: 'app-root',
template: `
<div class="content-wrapper">
<div style="display: flex; gap: 8px; margin-bottom: 12px;">
<button (click)="editComment()">Edit Comments</button>
<button (click)="editReply()">Edit Reply</button>
</div>
<ejs-pdfviewer
#pdfViewer
id="pdfViewer"
[documentPath]="document"
[serviceUrl]="serviceUrl"
style="height:650px;display:block">
</ejs-pdfviewer>
</div>
`,
imports: [PdfViewerModule],
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
LinkAnnotationService,
ThumbnailViewService,
BookmarkViewService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PageOrganizerService
]
})
export class AppComponent {

@ViewChild('pdfViewer')
public pdfViewer!: PdfViewerComponent;

public document: string =
'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf';

public serviceUrl: string = 'YOUR_SERVICE_URL';

public editComment(): void {
const viewer = this.pdfViewer;
if (!viewer) return;
const annot = viewer.annotationCollection?.[0];
if (annot) {
annot.commentType = 'edit';
annot.note = 'Edited Comment';
viewer.annotation.editAnnotation(annot);
console.log(viewer.annotationCollection?.[0]);
}
}

public editReply(): void {
const viewer = this.pdfViewer;
if (!viewer) return;
const annot = viewer.annotationCollection?.[0];
if (annot) {
annot.commentType = 'edit';
annot.replyComment = ['Edited Reply Comment'];
viewer.annotation.editAnnotation(annot);
console.log(viewer.annotationCollection?.[0]);
}
}
}

{% endhighlight %}
{% endtabs %}

Expand Down
Loading