vue-pdf-embed
vue-pdf-embed copied to clipboard
Props `scale` not working
Props scale
not working in latest version 1.1.4, may be it is not published yet?
Indeed, it was merged into master
but not published. I'm going to release it later this week.
Thanks for your reply
@hrynko @DescLee Can you help me with the scale prop. I cant figure out how to work with it. I tried setting it to :scale="20"
for example. This is supose to zome in/out, right?
已收到您的邮件,会尽快进行处理
This is supose to zome in/out, right?
Not really, it represents the ratio of canvas size to document size. So it is more about optimization, you can adjust it based on your canvas size if you need to optimize the memory usage (the larger scale
value, the better image quality, the more memory usage).
This prop has an automatic value, so you don't have to use this prop unnecessarily. And to implement scaling, I would suggest considering the width
prop and constraining the component in a scrollable parent block.
This is supose to zome in/out, right?
Not really, it represents the ratio of canvas size to document size. So it is more about optimization, you can adjust it based on your canvas size if you need to optimize the memory usage (the larger
scale
value, the better image quality, the more memory usage).This prop has an automatic value, so you don't have to use this prop unnecessarily. And to implement scaling, I would suggest considering the
width
prop and constraining the component in a scrollable parent block.
So what you mean is to change the width of the parent element of the canvas to implement the scaling function, for example using transform:translateZ(0) scale(10)
已收到您的邮件,会尽快进行处理
em~~~~~ scale not working
same here
已收到您的邮件,会尽快进行处理
It's been a while, but scale
prop is now included in 1.1.5
. Sorry for delay.
This is supose to zome in/out, right?这应该是放大/缩小,对吧?
Not really, it represents the ratio of canvas size to document size. So it is more about optimization, you can adjust it based on your canvas size if you need to optimize the memory usage (the larger
scale
value, the better image quality, the more memory usage).其实不然,它代表画布大小与文档大小的比率。所以更多的是优化,如果需要优化内存使用,可以根据自己的画布大小进行调整(scale
值越大,图像质量越好,内存使用越多)。 This prop has an automatic value, so you don't have to use this prop unnecessarily. And to implement scaling, I would suggest considering thewidth
prop and constraining the component in a scrollable parent block.该属性具有自动值,因此您不必在不必要的情况下使用该属性。为了实现缩放,我建议考虑width
属性并将组件限制在可滚动父块中。So what you mean is to change the width of the parent element of the canvas to implement the scaling function, for example using transform:translateZ(0) scale(10)所以你的意思是改变canvas父元素的宽度来实现缩放功能,例如使用translateZ(0) scale(10)
not,you can change vue-pdf-embed
attribute width
realize pdf scale