Comments (14)
@dcean @adminlte no point in using pdf.js directly on vue... the work in adapting it to play well would be best spent on improving this, which is almost entirely an adapter for pdf.js. The key issue is the worker, which makes keying the vue component a pain. I've tried restarting the component on errors by changing the key programmatically, that's unfortunately not yet feasible...
It's a very small component feel free to submit pull requests... e2e testing that works in travis/gitlab-ci would be great.
from vue-pdf.
So we have three problems:
1: Page numbers become out of sync
2: Rasterize on mobile (from jsfiddle demo, blurred when pinch to zoom on chrome mobile device but clear on pc device)
3: Can`t display on WebApp (from chrome mobile device)
from vue-pdf.
You can use V3.0.1 before author fix the bug, but pdf may be blurred on mobile.
Or you can use other lib such as pdf.js
from vue-pdf.
I test your jsfiddle by chrome:
Using macbookpro, pc side looks great:
Using chrome mobile device, the result as follows:
It still blurred......
When I test my own WebApp project using v3.1.2 by chrome mobile device, I use the demo: Example - display multiple pages of the same pdf document
It doesn`t work
It can be reproduced by using chrome mobile device.
We may also have some bugs on mobile side.
The support for mobile side is necessary.Many developer want to show pdf on mobile phone.
My WebApp project is for mobile side, index.html has meta:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
from vue-pdf.
The second screenshot (11/14) has the wrong page. I wasn't able to reproduce the blurryness, it might be how the GPU handles under stress. This fiddle comments out the "width 75%" style.
https://fiddle.jshell.net/5k4ptmqg/158/
I was able to reproduce the first page not loading bug on a 4k monitor zoomed to 500%... so it's not an explicitly mobile bug. It also shows no blurriness when doing so. But that's probably another issue to tackle separately.
Update:
I think he meant the pages are blurry when you pinch to zoom, which they aren't on the pdf js demo. I get they are rasterized and it isn't a huge priority right now.
from vue-pdf.
vector rendering has never been a feature so I would categorize that as an enhancement for now. The priority right now should be fixing the not displaying of the first page, which I've had happen on desktop even at 125% zoom.
Debounce is a workaround for page numbers becoming out of sync. It seems to happene on edge cases and on slow taxed devices.
from vue-pdf.
the first page doesn't render
the same mistake with me in the chrome mobile device when the pdf file is too large
but when i gone to the page 2 and return to the page 1, this page is successfully rendered.
what happen ? and how should I avoid it ?
from vue-pdf.
Reverting to v3.0.1
worked for me (for now), thanks @dcean (although I lost multipage support and had to revert to my hack)
from vue-pdf.
@rayfoss @dcean, do you happen to know if there is anyone working on this issue (particularly rasterization and not being displayed on mobile devices)?
BR,
Andreas
from vue-pdf.
please try v3.1.5
from vue-pdf.
Doesn't render the pdf for me on iOS Safari (works on Android Chrome now)
from vue-pdf.
is there any error message in the console ?
from vue-pdf.
No. Forgot to mention that only the first page is displayed (but PDF optimisation doesn't work also when zooming)
from vue-pdf.
@andreasvirkus, Please open a new issue for this bug
from vue-pdf.
Related Issues (20)
- 微前端子应用加载 vue-pdf 时报跨域问题 HOT 2
- PDF切换页面的时候会一闪一闪的,体验很差
- pdf 渲染高度超出屏幕范围,怎么查看屏幕之外的部分
- 项目引入vue-pdf
- pdfRender.cancel().catch(function(err) , undefined (reading 'catch')" HOT 4
- TrueType Collection does not contain "DCWGQU+CambriaMath" font.
- when the window.devicePixelRatio less than 1,the pdf is vague.
- 、
- vue2 + vite require is not defined
- vue2项目编译报错 HOT 2
- 已解决print后字体乱码问题 HOT 1
- 改变视图大小,拖拉窗口会报错
- 使用插件时而出现跨域问题 HOT 1
- 预览带印章的那页,印章展示是不透明的,源文件是透明的,How to fix it!!!!
- pdf花屏:大部分文件正常展示,只有个别文件有问题,如图,有遇到的大佬看到,给个思路。 HOT 2
- 抱歉,未找到浏览器 Sorry, browser not found
- 与@vue/cli-service 5.x 不兼容 HOT 3
- pdf不能预览PDF的电子发票,比如打车发票
- vue-pdf突然不能用了,是跨域了?
- 请问支持VUE3吗 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 vue-pdf.