-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors when reloading PDF #83
Comments
That is a very early version, consider to update to latest version. |
@TaTo30 Thanks for the quick response. I've updated the version to 1.9.3 and it didn't help me. Do you have any suggestions? |
Are the errors the same? Try to use a const pdfSources = [
'/example_014.pdf',
'/example_036.pdf',
'/example_041.pdf',
'/example_045.pdf',
'https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf',
]
// Setting the first (or default) PDF
const pdfSource = ref(pdfSources[0])
const pdfSourceIdx = ref(0)
const { pdf } = usePDF(pdfSource)
function nextPdf() {
pdfSourceIdx.value += 1
if (pdfSourceIdx.value >= pdfSources.length)
pdfSourceIdx.value = 0
pdfSource.value = pdfSources[pdfSourceIdx.value]
} You can get the full example here: https://tato30.github.io/vue-pdf/examples/advanced/multiple_pdf.html |
@TaTo30 Yes, the error is the same. "Try to use a ref in usePDF for reloading PDFs:" What do you mean? Can you explain, please? I get one file from the back end. So I sent a request to my back-end with a couple of PDF files and got a response with PDF which was combined. And I have drag-and-drop and after I change the file order I sent a new request to get a new one combined PDF file and after that I got this 2 errors |
@TaTo30 Also after updating the version I got a new error :fit-parent="false" - if set false the error isn't showing |
|
@TaTo30 I see. What if before uploading PDF my ref is empty? |
@TaTo30 Fixed by using not empty string in ref. But is there any way to pass emptiness so that there is no immediate request to try to receive a PDF file? |
You could use |
On my page, there is a PDF combiner, the essence of which is to combine several PDFs into one. Every time I change the order and send a back request, after receiving a response and reloading the PDF, I get two errors
"@tato30/vue-pdf": "^1.3.4",
"vue": "^3.2.47",
"vite": "^4.5.0"
Template:
Script:
The text was updated successfully, but these errors were encountered: