Comments (10)
This is a great idea! Hoping PDF.js supports being run in Electron, as that would be great.
❤️ Thanks for letting me know about this library.
from app-extension-qpdfviewer.
I believe I've found a solution. I used this to implement pdfvuer, but hopefully it will solve the dreaded "referenceError: window is not defined" in other libraries using PDF JS.
Add this to the build section of your quasar.conf.js:
build: {
chainWebpack (chain) {
chain.output.globalObject('this')
}
}
from app-extension-qpdfviewer.
added in v1.0.0-beta.4
@rconstantine PDFJS does not do blobs, but now you can decide which rendering engine to use. So, still available when type="html5"
.
from app-extension-qpdfviewer.
@hawkeye64 judging from the existence of
How to Build a PDF Viewer with Electron and PDF.js
and
Electron-PDF-Viewer
PDF viewer, created using Electron framework and PDF.js
I think I can say it must work on Electron.
from app-extension-qpdfviewer.
I would really love to see this as well. Having to rely on end users having the right apps (mobile) or extensions installed, or having to build a separate viewer for Electron kinda defeats Quasars purpose of deploying to multiple platforms from a single code base.
I've used pdfvuer with VueJS but I can't get it working with Quasar. I think there is a problem with PDF JS and the Window object but I'm not sure.
from app-extension-qpdfviewer.
I started investigating this as a possible solution. Hope to have a remedy soon.
from app-extension-qpdfviewer.
@hawkeye64 , I hope as you make the change that you can retain support for blobs per: https://forum.quasar-framework.org/topic/3551/quasar-qpdfviewer-v1-0-0-beta-2-release
Thanks!
from app-extension-qpdfviewer.
Just noting the release said it was tested on SPA, SSR, and Electron. Will Cordova be included?
from app-extension-qpdfviewer.
@danicholls If you are using Cordova, you are welcome to test. Those are just the three I was able to do quickly. In truth, I have never done a cordova app. I should learn, so I can test that as well.
from app-extension-qpdfviewer.
I have tested and PDFJS does seem to work with blobs? I'm creating PDF's on the fly using jsPDF and outputting as a blob and then viewing with your plugin and view type=pdfjs so I get the better functionality.
HTML
<q-pdfviewer
v-model="show"
:src="pdf"
type="pdfjs"
content-class="fit container"
inner-content-class="fit container"
/>
SCRIPT
pdfOutput () {
var doc = new JsPDF()
let address = [
this.start.COMPANY_NA,
this.start.SITE_ADDRE,
this.start.SITE_ADDR2,
this.start.SITE_CITY,
this.start.SITE_POSTC
]
doc.text(address, 15, 15)
let pdf = doc.output('blob', { filename: 'pdfTest.pdf' })
this.pdf = window.URL.createObjectURL(pdf)
}
from app-extension-qpdfviewer.
Related Issues (20)
- quasar/qpdfviewer is not compatible with @quasar/app v3.0.3 HOT 1
- Do it supports pdf document annotation? HOT 1
- Yarn package 2.0.0-alpha.3 points to old build HOT 6
- In mobile qpdfviewer displays only the first page without scrolling HOT 4
- extendWebpack error in app-vite using @next HOT 3
- QPdfviewer HOT 1
- dev working fine after build spa and publishing to server broke HOT 1
- Issue when pdfjs is not stored in server root HOT 1
- Need a slot for request header HOT 1
- can i use this in vue3? HOT 2
- Quasar dev fails HOT 1
- Problem with PWA HOT 2
- Issues with Safari and Firefox on macOS
- Update PDFjs to 4.x HOT 1
- `Unknown html tag q-pdfviewer ` in IntelliJ
- app-vite V2 beta HOT 2
- Error loading a pdf using pdfjs but working using html5 HOT 2
- Not display content when source is blob on ipad. HOT 2
- Extension(@quasar/qpdfviewer): is not compatible with @quasar/app v3.0.0-beta.25 HOT 8
- Package install of QPdfviewer v2.0.0 Alpha 1 not matching next branch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app-extension-qpdfviewer.