# How to change Paragraph Text box dimensions (bounds) in UXP?

**URL:** <https://forums.creativeclouddeveloper.com/t/how-to-change-paragraph-text-box-dimensions-bounds-in-uxp/11918>\
**Category:** UXP Plugin API\
**Tags:** uxp, javascript\
**Created:** [May 18, 2026, 6:03pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-change-paragraph-text-box-dimensions-bounds-in-uxp/11918 "2026-05-18T18:03:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![54Geovane54](https://avatars.discourse-cdn.com/v4/letter/5/b2d939/32.png) [@54Geovane54](https://forums.creativeclouddeveloper.com/u/54Geovane54)\
**Post date:** [May 18, 2026, 6:03pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-change-paragraph-text-box-dimensions-bounds-in-uxp/11918/1 "2026-05-18T18:03:50Z")

</div>

Hi everyone,

I’m developing a UXP script to automate text insertion for comic speech bubbles, and I’m currently testing it inside the UXP Developer Tool Playground.

My script successfully creates a text layer and converts it to Paragraph Text, but I cannot find a way to natively define the **width and height** (dimensions/bounds) of the paragraph text box without distorting the font characters (which means `layer.scale()` is out of the question).

I noticed in the documentation that `Layer.bounds` and `TextItem.bounds` are **Read-Only**.

Here is my current code:

```auto
const app = require('photoshop').app;
const core = require('photoshop').core;

const fontSize = 18;
const posX = 16 + fontSize;
const posY = 18 + fontSize;
const width = 358;
const height = 122;

async function setText() {
    const doc = app.activeDocument;

    if (!doc) return;

    const options = {
        name: 'Name',
        contents: 'Contents',
        fontName: 'ComicSansMS-Bold',
        fontSize: fontSize,
        position: { x: posX, y: posY}
    };

    await core.executeAsModal(async () => {
        const layer = await doc.createTextLayer(options);
        const textItem = layer.textItem;
        await textItem.convertToParagraphText();
        textItem.paragraphStyle.justification = 'center';
    })
}

setText();

```
