These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Printx Problem

asjef15
Registered: Sep 2 2009
Posts: 6

I am having a problem with a script using the printx util.

if (event.value == "") {
event.value = ""}
else {
event.value = util.printx(event.value + "'", event.value) ;}

The object of the script is to add an apostrophe to the end of number denoting feet.
The script works in all tested scenarios except with the number 29
When the value is 29 it displays 22’

Have I done something wrong? Do I need to create and use a variable in the script? Why does it work for every number that I have tried except 29?

Thanks,
Jerett

My Product Information:
Acrobat Pro 9.3.1, Windows
asjef15
Registered: Sep 2 2009
Posts: 6
I changed the Script to:

var sMPS2 = event.value.toString();
var sFoot = "'";
event.value = sMPS2 + sFoot;

Works fine. but would still lite advice on the printx script.
try67
Expert
Registered: Oct 30 2008
Posts: 2399
printx uses '9' as a special symbol, meaning: Copy the rest of the source string from this point on.
As you discovered, there's no need to use printx just to add an apostrophe at the end of a string.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

asjef15
Registered: Sep 2 2009
Posts: 6
Yes, I had just caught the mistake. Kept looking right past the problem. Thanks...