react-to-pdf icon indicating copy to clipboard operation
react-to-pdf copied to clipboard

add imageFormat prop to support jpeg or png

Open charleskoehl opened this issue 4 years ago • 2 comments

png is sharper on small docs like labels

charleskoehl avatar Jan 11 '21 02:01 charleskoehl

Thanks for this @charleskoehl and sorry the delay. Could you include some images samples showing the difference, just to better understand why to customize this? Does affect the size as well?

ivmarcos avatar May 18 '21 18:05 ivmarcos

@charleskoehl I think you have an error. You restrict the types to "pdf" and jpeg but in the other places you have "png"

https://github.com/ivmarcos/react-to-pdf/pull/43/commits/fe2919872b53741f1af0646a210c39797af85f80 https://github.com/ivmarcos/react-to-pdf/pull/43/commits/a84476a2d77af1907c10490965c415d7870085fe

CrackedPixel avatar May 28 '22 18:05 CrackedPixel

Thanks for this! Closing due to the release of v1.0.1 supporting image format prop using the canvas attributes, please refer to the advanced options example in https://github.com/ivmarcos/react-to-pdf#usage.

ivmarcos avatar Sep 07 '23 16:09 ivmarcos