Comments (7)
These are non-issues to the plugin. Please use stack overflow or another medium for receiving help on web component implementations.
When using any stencil web component you need to add the CUSTOM_ELEMENTS_SCHEMA
to the schemas
declaration of your modules (for Angular).
There's no need to do framework specific examples, StencilJS documents integration paths: https://stenciljs.com/docs/framework-integration
from pdf-viewer.
Can you do an ionic3 example? I read the documentation according to the above operation or not. Can you come to a small code for us to visit?
from pdf-viewer.
- npm i @teamhive/stencil-pdf-viewer
2.import '@teamhive/stencil-pdf-viewer/dist/pdfviewer';
I didn't understand the third part. I can build a small project. I can achieve it in ionic3 or 4. Let me see the effect? I read the documentation for this plugin is not very comprehensive or you can send me a mailbox to do a small ionic3 or 4 sample can you? Thank you very much.
from pdf-viewer.
https://github.com/VadimDez/ng2-pdf-viewer
This conditioning is very clear but he does not support the file now. I can't access it with this plugin.
from pdf-viewer.
Thank you very much for doing what you said but it does not support local files.
Fetch API cannot load file:///D:/pdftest/HGH-18123.pdf. URL scheme must be "http" or "https" for CORS request.
hive-pdf-viewer.js:80831 Unhandled promise rejection DOMException: Failed to execute 'postMessage' on 'Worker': TypeError: Failed to fetch could not be cloned.
at MessageHandler.postMessage (http://localhost:8100/build/pdfviewer/hive-pdf-viewer.js:58560:19)
at sendStreamRequest (http://localhost:8100/build/pdfviewer/hive-pdf-viewer.js:58377:14)
at Object.error (http://localhost:8100/build/pdfviewer/hive-pdf-viewer.js:58420:9)
at http://localhost:8100/build/pdfviewer/hive-pdf-viewer.js:66191:18
at run (http://localhost:8100/build/pdfviewer/hive-pdf-viewer.js:80796:22)
at http://localhost:8100/build/pdfviewer/hive-pdf-viewer.js:80813:30
at MutationObserver.flush (http://localhost:8100/build/pdfviewer/hive-pdf-viewer.js:80601:9)
at t.invoke (http://localhost:8100/build/polyfills.js:3:9283)
at r.runGuarded (http://localhost:8100/build/polyfills.js:3:4655)
at MutationObserver. (http://localhost:8100/build/polyfills.js:3:4267)
from pdf-viewer.
- The example is using local files.
- We use the plugin with our Ionic 4 Capacitor app that has offline files and it works.
Your issues is CORS, not the plugin. Security rules are preventing you from accessing the file. Either serve the file from a local server and access through a valid http/https
schema or disable security rules for your device/browser (not recommended).
from pdf-viewer.
I know that when I use the form ../../assets/conf/_archive/HGH-18123.pdf, he can do it but when I use the file: /// D:/pdftest/HGH-18123.pdf It can't be done. You can access the files in a folder under a certain drive letter on your computer. The file starts with the file:///.
from pdf-viewer.
Related Issues (17)
- Do you support local files open? HOT 2
- t.resolve is not a function HOT 3
- ionic3 blank HOT 2
- ionic4+angular6 PDF loading is not stable HOT 2
- Feature request: custom button and custom handler HOT 1
- Feature request: Add Pinch to Zoom feature HOT 1
- file๏ผ file:///data/data/com.mhc.qccenter/files/HGH-18123.pdf HOT 2
- He is good on the browser When I run to my phone, he will report the following error. HOT 4
- Android API 24 Unload Error
- Feature request: text selection
- Feature request: open BLOB HOT 2
- Pinch-zoom destroys whole Capacitor container HOT 1
- Try to use it in a Stencil JS application. HOT 4
- Unnecessary files in published package
- ES5 error in Capacitor 2.4.6/Stencil 2.0.3 environment HOT 2
- Cannot read properties of undefined (reading 'initializedPromise')
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 pdf-viewer.