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

Loading Progress #34

Open odai-alali opened 6 years ago

odai-alali commented 6 years ago

Hi, Is there anyway to get the pdf loading progress. If not, any idea how to implement it in this package?

afaridanquah commented 5 years ago
<Page>
    <ActionBar class="action-bar" title="Confirmation"/>
    <FlexboxLayout flexDirection="column">
        <ActivityIndicator v-if="loading" busy="true" style="vertical-align: middle; flexGrow: 2"/>
        <PDFView flexGrow="1" src="confirmation-pdf" @load="loaded"></PDFView>
    </FlexboxLayout>
</Page>
export default {
    data: () => ({
        loading: true
    }),
    methods: {
        loaded() {
            this.loading = false;
        }
    }
}

Hope that helps.

odai-alali commented 5 years ago

Hi,

Thank you for the answer. Actually, that's what I already did. The question is to get the loading progress value (percentage)

yclplt commented 5 years ago
<Page>
  <ActionBar class="action-bar" title="Confirmation"/>
  <FlexboxLayout flexDirection="column">
      <ActivityIndicator v-if="loading" busy="true" style="vertical-align: middle; flexGrow: 2"/>
      <PDFView flexGrow="1" src="confirmation-pdf" @load="loaded"></PDFView>
  </FlexboxLayout>
</Page>
export default {
  data: () => ({
      loading: true
  }),
  methods: {
      loaded() {
          this.loading = false;
      }
  }
}

Hope that helps.

how can i write angular ?