Corran
Corran
SSolara
Created by Corran on 3/8/2024 in #questions-issues
Using vue libraries with ipyvuetify & solara
Is it naive to think vuepdf should work out of the box with a ipyvuetify template? I've stripped the code to its bare minimum, it should show a single pdf page from the url. My code isnt showing errors but it also isn't showing a pdf. vue_pdf.vue
#pdf_viewer.vue
<template>
<div>
<VuePDF :pdf="pdf" text-layer/>
</div>
</template>


<script setup>
import { VuePDF, usePDF } from '@tato30/vue-pdf';
import '@tato30/vue-pdf/style.css';

const { pdf } = usePDF('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf')

</script>
#pdf_viewer.vue
<template>
<div>
<VuePDF :pdf="pdf" text-layer/>
</div>
</template>


<script setup>
import { VuePDF, usePDF } from '@tato30/vue-pdf';
import '@tato30/vue-pdf/style.css';

const { pdf } = usePDF('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf')

</script>
vue_pdf.js
import solara
import ipyvuetify as ipv
import os

@solara.component
def Viewer():
class PDFViewer(ipv.VuetifyTemplate):
template_file = os.path.realpath(os.path.join(os.path.dirname(__file__), "./pdf_viewer.vue"))

return PDFViewer.element()
import solara
import ipyvuetify as ipv
import os

@solara.component
def Viewer():
class PDFViewer(ipv.VuetifyTemplate):
template_file = os.path.realpath(os.path.join(os.path.dirname(__file__), "./pdf_viewer.vue"))

return PDFViewer.element()
3 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
Hi, I'm wondering if .use_effect is expected for ipyvuetify widgets in a jupyter notebook? Its registering the event but the widget just disappears when it occurs.
23 replies