diegomura / diegomura/react-pdf

Text stroke not working

Open
#2,720 0 comments 0 reactions 0 assignees View on GitHub
new feature
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

**Describe the bug**

`stroke` and `strokeWidth` properties are not working on `Text` element.

I tried this out in different browsers (chromium based, safari and firefox) and it does not work in any of them.

I found some code in examples that does stroke on text, and it does not work there either:

https://github.com/diegomura/react-pdf/blob/5e9a113f51e0569f6e553d43c86e5e353de41f6e/packages/examples/src/svg/Svg1.jsx#L98-L100

So considering there is code in the examples that uses this feature – I think this is supposed to work and not a new feature request, but correct me if I am wrong, of course.

**To Reproduce**

Code:

```tsx



```

REPL: https://react-pdf.org/repl?code=3187b0760ce02e0040ca03703980540a6d18178600a0253601f1e0140c3003c00888c00ae02d9a614479155002808649aed3a74a8890c00ee012c009940016580110056000cab14c3969252395095a8d82870f4003d639c31a6004f1b9ba00271001acd12e769a668066920036814a0046813cc06e4e50ae1e00ea32f24a008c8a445018509400f4166c1c42b9a22614b9bcfc26b9b40cccacecf800dca42d004a6891505cd400620074de60d268ceb822c8e89839444da44000

**Expected behavior**
Stroke being rendered in the document

**Screenshots**
This is what the code in the repl looks like right now:

Screenshot 2024-04-17 at 13 36 32

This is what it should look like:

Screenshot 2024-04-17 at 13 37 28

**Desktop:**

- OS: MacOS
- Browser: chrome, safari and firefox
- React-pdf version: v3.4.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.