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>
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)
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;
}
Discussions, help and advice about the Alfresco Development Framework.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.