I'm not sure if there is a way to do this or not, but here is my situation and question.
I have created a form that auto-fills a user's name, which is pulled from the LMS system (Absorb LMS) so it will give them a "certificate" when they complete a course. The PDF form I have created is the certificate. What I want is for their name (which is uppper and lower case in the system) to come out as all caps on the PDF certificate.
I've tried the other scripts such as
event.value = event.value.toUpperCase(); and
event.value = event.value.toString().toUpperCase() ; and even
The issue is that importing the data is not triggering any events, so your code never gets a chance to work. If you apply the first code you posted as the calculation script of your field then you just need to force a calculation when the file is opened, and it should work.
To do that embed the following as a doc-level script: