07-21-2022 12:49 AM
I am trying the `adf-viewer-extension` but seems it's not reflecting.
Does anyone have idea?
My adf package version is 4.8.0.
(It works for other files like pdf, csv, png/jpg. I just want to explore if I can display word file.)
<adf-viewer
id="dw-viewer-id"
[(showViewer)]="showViewer"
[displayName]="name"
[blobFile]="content"
(showViewerChange)="onViewerVisibilityChanged()"
>
<adf-viewer-extension [supportedExtensions]="['doc', 'docx']" #extension>
<ng-template let-urlFileContent="urlFileContent" let-extension="extension">
<div>word</div>
</ng-template>
</adf-viewer-extension>
<adf-viewer-more-actions *ngIf="enableDownload" id="dw-viewer-more-action-id">
<button mat-menu-item (click)="downloadContent()">
<mat-icon>file_download</mat-icon>
<span>{{ 'ADF_VIEWER.ACTIONS.DOWNLOAD' | translate }}</span>
</button>
</adf-viewer-more-actions>
</adf-viewer>
07-26-2022 06:13 AM
It seems to me that your problem has nothing to do with ADF. Make sure your local transformation services are up and running correctly (especially libreoffice)
09-21-2023 11:25 PM
This issue is coming while using blobFile in ADF viewer, you should try this...
<adf-viewer id="dw-viewer-id" [(showViewer)]="showViewer" [displayName]="name" [blobFile]="content" (showViewerChange)="onViewerVisibilityChanged()"
#adfviewer .....
@ViewChild('adfviewer', { static: false })
adfviewer: ViewerComponent;
private changeDetectorRef: ChangeDetectorRef
....
if(this.content){ //blob content
this.changeDetectorRef.detectChanges();
this.adfviewer.viewerType = 'custom';
this.adfviewer.extensionTemplates[0].isVisible = true; // forcefully assign 1st template for blobFile value.
const url = URL.createObjectURL(this.content); // create blob url
this.adfviewer.urlFileContent = url;
}
Explore our Alfresco products with the links below. Use labels to filter content by product module.