teammaestro / pdf-viewer Goto Github PK
View Code? Open in Web Editor NEWPDF viewer web component built in StencilJS. Reusable in Angular, Ionic, React, Vue.JS, etc.
License: MIT License
PDF viewer web component built in StencilJS. Reusable in Angular, Ionic, React, Vue.JS, etc.
License: MIT License
Need to remove most of assets found in pdf-viewer/dist/pdf-viewer/pdfiv-ewer-assets/viewer/web
.
This custom wrapped package doesn't use the base pdf.js:
He is good on the browser
When I run to my phone, he will report the following error.
Unable to open asset URL: file:///android_asset/www/assets/fonts/roboto-bold.woff2
Unable to open asset URL: file:///android_asset/www/assets/fonts/roboto-bold.woff
Unable to open asset URL: file:///android_asset/www/assets/fonts/roboto-bold.ttf
Why is this so?
@natenorm @jpinkster @db3dev @sean-perkins @sbannigan
ie. Your app requires users to read and accept a PDF contract
TypeError: Cannot read property 'querySelector' of nul
TypeError: Cannot read property 'querySelector' of null", source: file:///android_asset/www/build/main.js (178928)
not error,ionViewDidLoad load , page is blank
I am trying to test the component in an ionic v3 app by following these instructions to set things up.
However I have the following error when opening a page with the hive-pdf-viewer
on it.
TypeError: t.resolve is not a function
at Object.setNativePromise (polyfills.js:3)
at L.configurable.L.set (polyfills.js:3)
at module.exports (hive-pdf-viewer.js:79796)
at $export (hive-pdf-viewer.js:79858)
at hive-pdf-viewer.js:80943 "http://localhost:8100/build/pdfviewer/hive-pdf-viewer.js"
The www
directory looks like this with the pdfviewer files:
System info:
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.9
Cordova Platforms : none
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.11.3
npm : 6.3.0
OS : Windows 10
Tracking an Android bug that is prominent on API 24 when unloading the PDF.
Cannot read property `cleanup` of undefined.
PDFApplication is disposed prior to the unload event being fired for older devices. Need to provide a safety check that it exists prior to calling:
https://github.com/TeamHive/pdf-viewer/blob/development/src/components/pdf-viewer/pdf-viewer.tsx#L92
Hi!
Would be nice have a way to get selected text by user.
Hi!
I downloaded this basic example of the library https://react-gdbl8p.stackblitz.io and it throws the following error
In the example the version of the library is 3.0.0 , i tried to update to the latest 4.2.0 but is not working
Can you take a look ?
Thanks
pdfviewer.js:59 GET https://js.arcgis.com/4.8/pdfviewer/pdfviewer.core.js 404 ()
Hey Sean,
as discussed on Slack, here‘s the issue.
I‘m using the team hive PDF viewer. I think it uses an iFrame under the hood. When it is open my pure Stencil app can be pinch-zoomed. This affects the whole app container of Capacitor. Any idea how this can be prevented.
You said:
Capacitor should prevent the web view pinch to zoom. However we haven’t baked that into the component yet. It is on our roadmap in the next few months.
See attached video.
I think you can re-pro without a test case repo?
Let me know!
Thanks,
Matt
Support for local files to open files like path: file:///D:/pdftest/HGH-18123.pdf
Support for local files to open files like path: file:///D:/pdftest/HGH-18123.pdf
Is there any ionic3 integration support? I see ng2-pdf-viewer support but does not support the opening of local file files.
Could you please add support for passing BLOB instead of URL of a file?
PDFjs already supports this (https://mozilla.github.io/pdf.js/examples/ look under Hello World using base64 encoded PDF section).
[Angular]
'hive-pdf-viewer' is not a known element:
Would be nice if Multi-touch devices could do Pinch to Zoom instead of using zoom buttons.
Hey guys,
upgraded an app that uses your pdf-viewer. On Android I'm getting this in the dev console:
viewer.html:1 Uncaught (in promise)
UnknownErrorException {message: "The browser/environment lacks native support for c…ed`); please use an ES5-compatible build instead.", name: "UnknownErrorException", details: "Error: The browser/environment lacks native suppor…ed`); please use an ES5-compatible build instead."}
details: "Error: The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g. `ReadableStream` and/or `Promise.allSettled`); please use an ES5-compatible build instead."
message: "The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g. `ReadableStream` and/or `Promise.allSettled`); please use an ES5-compatible build instead."
name: "UnknownErrorException"
__proto__: Error
Continues to work on ios
as it did on Android the last year with Capacitor 1.5.
Should I maybe add ES5 build to my output?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.