PDF Editing Issues

How to Switch PDF Text Fields Between Horizontal and Vertical

Steven ParkerSteven Parker Oct 28, 2026 869 views

Question details

The user wants to know how to enable end users filling out an interactive PDF form to toggle the text direction of a specific field between horizontal and vertical orientations.

How to Switch PDF Text Fields Between Horizontal and Vertical
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating an interactive PDF form where respondents may need to input text in varying orientations, requiring a dynamic toggle feature.
Observed behavior
The goal is to provide an interactive button within the PDF form that rotates the text field upon being clicked, successfully changing the input direction.
Before you start

Ensure you have access to a PDF editor with advanced form creation and JavaScript capabilities, such as Adobe Acrobat Pro, and verify the exact name of the text field you wish to manipulate.

Solution 1Recommended

Create a Toggle Button Using JavaScript

Use a form button programmed with a JavaScript action to dynamically change the rotation property of the target text field.

Interactive PDF forms can utilize JavaScript to modify field properties on the fly. By linking a script to a custom button, you can evaluate the current rotation of a text field and toggle it between 0 degrees (horizontal) and 90 or 270 degrees (vertical).

1
Enter Form Preparation Mode

Open your PDF document in Adobe Acrobat Pro and select the 'Prepare Form' tool from the right-hand pane to begin editing form fields.

2
Add and Identify the Text Field

Insert a new 'Text Field' where you want the user to type. Right-click the field, choose 'Properties', and note the exact Name of the field (e.g., 'TextField1').

3
Insert an Action Button

Select the 'Button' tool from the Prepare Form toolbar and place it near the text field. Label it appropriately, such as 'Rotate Text'.

4
Apply the JavaScript Action

Right-click the new button and go to 'Properties'. Navigate to the 'Actions' tab, select 'Mouse Up' as the trigger, choose 'Run a JavaScript' from the action dropdown, and click 'Add'.

5
Input the Toggle Script

In the JavaScript editor, write a script to fetch the text field by its name, check its 'rotation' property, and change it. For example, if rotation is 0, set it to 90; otherwise, set it back to 0. Click 'OK' to save.

6
Test the Form

Exit 'Prepare Form' mode and click your new button. Type text into the field to verify that the orientation successfully toggles between horizontal and vertical.

Create a Toggle Button Using JavaScript
Compatibility Warning: Always test the form in the specific PDF reader your users will utilize, such as Adobe Acrobat Reader. JavaScript functions may not be supported in web-browser PDF viewers or mobile PDF apps.

Easily Edit and Manage PDF Forms with WPS Office

WPS Office provides a comprehensive suite of PDF tools, allowing you to easily fill, edit, and manage interactive PDF forms. Whether you need to adjust text orientation, add new fields, or convert documents, WPS PDF handles it effortlessly.

  1. 1. Open Your PDF in WPS: Launch WPS Office and open your interactive PDF form document.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to interact with fillable text fields and buttons.
  3. 3. Edit Text Properties: If you need to permanently change the text layout, switch to the 'Edit' tab to modify text orientation or properties directly.
  4. 4. Save and Export: Once your form adjustments are complete, click 'Save' or export the document to share it with your users.
Fully compatible with standard interactive PDF forms and Adobe Acrobat files.Intuitive form filling and text editing interface for seamless document management.Easily adjust text layout, orientation, and formatting directly within the PDF editor.Lightweight, fast, and completely free to download for your everyday Office and PDF needs.
microsoft office alternative - wps office

Frequently Asked Questions

Does JavaScript in PDF forms work on mobile devices?

Most mobile PDF readers and built-in browser viewers have limited or no support for JavaScript. It is highly recommended to rely on standard, static orientation settings if your audience predominantly uses mobile devices.

Can I set a PDF text field to be vertical by default?

Yes. In most professional PDF form editors, you can open the properties of the text field, navigate to the 'Appearance' or 'General' tab, and manually set the text rotation to 90, 180, or 270 degrees.

Why isn't my JavaScript button rotating the text field?

This usually occurs if the field name referenced in your script does not exactly match the actual name of the text field. Check for typos and case sensitivity. Additionally, ensure that JavaScript execution is enabled in your PDF reader's security preferences.