Copy link to clipboard
Copied
Hello,
I would like to change x and y text position using javascript.
Clicking on a button, I would like to set x/y pos of differents text elements presents on my PDF.
Do you have a way to do it, I can't find any solution.
Thanks!!
Copy link to clipboard
Copied
Position of form fields or comments?
Copy link to clipboard
Copied
The only way to do this is if the text is in a form field or annotation.
You can find scripting info on doing this here:
https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm
Copy link to clipboard
Copied
Thank you for your answers. I was not specific enough indeed.
I has a form text element in my PDF.
I would like to change it's position using javascript. Example :
myTextFormField.setxpos = 100;
myTextFormField.setypos = 100;
=> I know this os not the good code 🙂 Just for the example.
I'm going to read it thanks but not sur this is my need 🙂
Copy link to clipboard
Copied
If it is a text field that is being moved, then the article is exactly what you need. You'll also find a free example that shows how to move fields here:
https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm
Look at the "Bouncing Button" and "Swat the Fly" example files.