We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
`export function pdf (resp) { const myPromise = new Promise((resolve, reject) => { const blob = new Blob([resp.data], { type: resp.data.type }) let url = (window.URL || window.webkitURL || window || {}).createObjectURL(blob) var xhr = new XMLHttpRequest() xhr.open('GET', url, true) xhr.responseType = 'blob' xhr.onreadystatechange = (() => { if (xhr.readyState === 4 && xhr.status == 200) { resolve((window.URL || window.webkitURL || window || {}).createObjectURL(xhr.response)) // now url is ready } }) xhr.send() })
return myPromise }`
The text was updated successfully, but these errors were encountered:
Hello, I would like to know if you have found a solution to your problem because I am in the same situation as you.
I do so.
const blob = new Blob([response.data], {type: "application/pdf;charset-UTF-8"}) const url = window.URL.createObjectURL(blob) pdfSrc.value = url
<q-pdfviewer v-if="pdfSrc" :src="pdfSrc" type="html5" />
And my controller :
$file = stream_get_contents($document->getPj()); return new Response($file, 200, array( 'Content-Type' => "application/octet-stream", 'Content-Length' => $document->getSize(), ));
Sorry, something went wrong.
No branches or pull requests
`export function pdf (resp) {
const myPromise = new Promise((resolve, reject) => {
const blob = new Blob([resp.data], { type: resp.data.type })
let url = (window.URL || window.webkitURL || window || {}).createObjectURL(blob)
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.responseType = 'blob'
xhr.onreadystatechange = (() => {
if (xhr.readyState === 4 && xhr.status == 200) {
resolve((window.URL || window.webkitURL || window || {}).createObjectURL(xhr.response))
// now url is ready
}
})
xhr.send()
})
return myPromise
}`
The text was updated successfully, but these errors were encountered: