Code Monkey home page Code Monkey logo

Comments (7)

sean-perkins avatar sean-perkins commented on May 22, 2024 2

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.

qwerqwermhc avatar qwerqwermhc commented on May 22, 2024 1

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.

qwerqwermhc avatar qwerqwermhc commented on May 22, 2024
  1. 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.

qwerqwermhc avatar qwerqwermhc commented on May 22, 2024

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.

qwerqwermhc avatar qwerqwermhc commented on May 22, 2024

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.

sean-perkins avatar sean-perkins commented on May 22, 2024
  1. The example is using local files.
  2. 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.

qwerqwermhc avatar qwerqwermhc commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.