Merott / nativescript-pdf-view

A basic PDF viewer plugin for NativeScript. Now maintained by @madmas: github.com/madmas/nativescript-pdf-view
Other
32 stars 35 forks source link

I can't get pdfview to render in nativescript 5 angular 7 #41

Open JayLHein opened 5 years ago

JayLHein commented 5 years ago

I am not able to get pdfview to render on Android. I have even hard coded the external url. I am using Nativescript 5 and Angular 7 Here is my setup

import { registerElement } from 'nativescript-angular';
registerElement('PDFView', () => PDFView);

The html code:

    <GridLayout *ngIf="displayAttach" rows="auto, *" columns="*">
        <StackLayout row="0" class="attach-header">
            <Label class="fa back-icon" text="&#xf355;" (tap)="onDismissAttachment()"></Label>
        </StackLayout>
        <StackLayout row="1">
            <PDFView src="http://www.orimi.com/pdf-test.pdf"></PDFView>
            <Label text="Hello World"></Label>
            <!-- <WebView row="1" #webview [src]="attachSrc"></WebView> -->
        </StackLayout>
    </GridLayout>

The html is running inside a modal dialog.

Any suggestions/ help would be greatly appreciated.

JayLHein commented 5 years ago

I am sorry, I pressed the wrong button.

cristiansandru11 commented 5 years ago

+1

madmas commented 4 years ago

Hi, please check out the updated demo in https://github.com/madmas/nativescript-pdf-view, it's using the TNS 6. Also I verified with Angular and it worked as expected. DO you still experience these difficulties?