vue-pdf-embed icon indicating copy to clipboard operation
vue-pdf-embed copied to clipboard

Props `scale` not working

Open DescLee opened this issue 2 years ago • 8 comments

Props scale not working in latest version 1.1.4, may be it is not published yet?

DescLee avatar Jul 11 '22 03:07 DescLee

Indeed, it was merged into master but not published. I'm going to release it later this week.

hrynko avatar Jul 11 '22 07:07 hrynko

Thanks for your reply

DescLee avatar Jul 11 '22 08:07 DescLee

@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?

bogdan12893 avatar Aug 03 '22 08:08 bogdan12893

已收到您的邮件,会尽快进行处理

DescLee avatar Aug 03 '22 08:08 DescLee

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.

hrynko avatar Aug 03 '22 16:08 hrynko

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)

nullhan avatar Aug 22 '22 07:08 nullhan

已收到您的邮件,会尽快进行处理

DescLee avatar Aug 22 '22 07:08 DescLee

em~~~~~ scale not working

TLovers avatar Sep 01 '22 09:09 TLovers

same here

Krue1 avatar Oct 27 '22 08:10 Krue1

已收到您的邮件,会尽快进行处理

DescLee avatar Oct 27 '22 08:10 DescLee

It's been a while, but scale prop is now included in 1.1.5. Sorry for delay.

hrynko avatar Nov 08 '22 10:11 hrynko

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 the width 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

CMG-CEO avatar Nov 29 '23 03:11 CMG-CEO