# useParagraphResize

Source: https://sdk.pdf.net/docs/v1/reference/useParagraphResize



**Deprecated:** use [useSetParagraphProps](https://sdk.pdf.net/docs/v1/reference/useSetParagraphProps) with `x`, `y`, and `width` instead. It takes several paragraphs at once and sets the other paragraph properties too.

Returns a function that moves a paragraph and sets its wrap width. The height isn't set: it follows the text content.

```ts
const resizeParagraph = useParagraphResize()

resizeParagraph(paragraphId, x, y, width)
```

* `x` and `y` set the start of the first line's baseline in user space, and `width` sets the width the text wraps at, in text space units (see [useSetParagraphProps](https://sdk.pdf.net/docs/v1/reference/useSetParagraphProps) for both).
* An id that doesn't identify an existing paragraph throws `InvalidInputError`; with no document loaded, the call throws `DocumentNotLoadedError`.

