Skip to main content
Participant
November 10, 2017
Answered

How to set dropdown border line style solid via javascript

  • November 10, 2017
  • 1 reply
  • 1774 views

Hi there,

I have a large pdf file with lots of filled forms in it. I need all the dropdown fields to have the border line style as solid via javascript, so that i can print only the value of the field and not the outline around it.

I now how to do it manually, by going to Properties- Appearance - Border Line Style Solid - no color, but i need to do it automatically because the pdf file has more than 600 dropdowns in it.
I am sharing this image in order to understand what i want to achieve by code. The arrows shows the fields that I want to hide the outline by code.

I need to print the pdf, so that the printed documents do not show the outline of the two dropdowns.

Is this possible to do it?

The needed settings i need to achieve by code are the ones shown below:

Any help will be greatly appreciated.

This topic has been closed for replies.
Correct answer try67

The border style is not important, actually. What you need to set are the "line thickness" and "border color" properties, which you can do like this:

var f = this.getField("Dropdown1");

f.lineWidth = 0;

f.strokeColor = color.transparent;

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
November 10, 2017

The border style is not important, actually. What you need to set are the "line thickness" and "border color" properties, which you can do like this:

var f = this.getField("Dropdown1");

f.lineWidth = 0;

f.strokeColor = color.transparent;