Add support for border radius #993
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

What?
Adds support for
styles.borderRadiusto thePdfViewcomponent.Motivation
First of all, thank you @wonday and everyone else for maintaining this library — it has been extremely helpful.
In one of my apps, I needed to render the PDF view inside a rounded container (e.g. a card UI). However, I think PdfView currently does not support rounded corners on iOS due to how PDFKit renders its content.
How?
iOS
Internally, PDFView (which is the native impl. of the renderer this lib uses on iOS) manages a UIScrollView for page rendering. Applying a corner radius directly to the PDFView on its own does not fully work as you'd have to recursively apply the same radius to the UIScrollView internal views, but that does not quite work when scrolling as the pages are lazily rendered - resulting in wonky rounded pages some of the times.
Note: I had initially verified the above using this snippet via d9e0714
So I decided to wrap the PDFView in a dedicated clipping container instead, which is then responsible for applying the corner radius and clip its child view, which in this case is PdfView.
Screen.Recording.2026-01-03.at.09.55.18.mp4
Android
Setting border radius in android already works in this library which is great! So nothing changes in this end.
Screen.Recording.2026-01-03.at.15.18.41.mp4
PS: If you have any other suggestions, I’d love to hear them and will gladly take them on board.
Cheers,
Kishan