pdfjs
pdfjs copied to clipboard
possible `border-radius` support for cell?
Hi Markus,
thanks a lot for this lib with it's Wonderfull api. It's way more focused on devs needs and real world use-cases than any other lib I had the chance to work with... good job!
Now, as per CI-Guide I had to find a way to place an image with "roundedCorners" on-top of a 2-coloured header provided by a pdf-template. Managed that by drawing those coloured corners onto the image directly. Another much more precise and flexible approach I was thinking of is to place that image within a cell
and configure a border-radius
(css-analogy), like so:
const img = new pdf.Image(imageBuffer)
this.doc.cell({ x: 40, y: 842 - 40, boderRadius: 10, overflow: 'hidden' }).image(img, { width: 140 })
What do you think? Would such be feasible in any way?
Example output composed by pdf-template (all green drawings) cells with text and cell with modified image:
![Bildschirmfoto 2020-04-09 um 12 35 23](https://user-images.githubusercontent.com/118508/78887308-e7f07a00-7a5f-11ea-9688-0cd21b4f3953.png)
Hi, thanks for the kind words! I agree that this would be a very useful feature to have! Though I am not sure about the required effort. I'll have to find some time to dig the PDF specification a bit, maybe there is a way to use some kind of a mask to apply such rounded borders to a cell.
Hi, thanks for the kind words! I agree that this would be a very useful feature to have! Though I am not sure about the required effort. I'll have to find some time to dig the PDF specification a bit, maybe there is a way to use some kind of a mask to apply such rounded borders to a cell.
Could you please implement this? Roundness is key in modern UI, and to make my pdfs look good, I would also like to have roundness. Just look at this website... Imagine if css did not have border radius. Look at the amount of rounded objects here, I would love to have the same ability in pdfjs.
Could you please implement this? Roundness is key in modern UI, and to make my pdfs look good, I would also like to have roundness. Just look at this website... Imagine if css did not have border radius. Look at the amount of rounded objects here, I would love to have the same ability in pdfjs.
I don't need convincing that border-radius is nice/useful to have 😄. Since my usage of pdfjs does not require border-radius
, I don't expect to invest time into it anytime soon, so don't keep your hopes up.