Copy link to clipboard
Copied
Hi,
I'm using the java script to place a multi page PDF file. It works as advertised, but I want it to place the pdf file at a certain x axis. I've tried editing the java script that comes with InDesign and it won't let me.
app.pdfPlacePreferences.pageNumber = myCounter;
myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];
if(myCounter == 1){
Instead of placing the pdf pages at 0,0 I want to place them at 0, 1.75
I've also tried copy the text in the script and putting it into a text edit file and also a Word file and none of them will let me save it.
Any suggestions on how to do this?
Thank you,
Maria
1 Correct answer
Hi Manan,
I figured it out. I had to go to the script file, get info and give myself permission to edit it. It was marked as Read Only. I changed it to Read and Write and now I can change where I want the pdf files placed in my InDesign document. I also learned that the code is written for x axis followed by y axis (as it should be).
Thank you for your efforts.
Maria
Copy link to clipboard
Copied
Hi Maria,
Is the issue that you are not able to save and test your edited code or that it does not produce correct results?
If it is the edit issue, then i would suggest to create a file using a simple text editor like notepad on Win and Textpad on a MAC. Paste your code into a new file you create in these editors and save it with extension jsx. Then place it in the scripts folders and then you can execute it using the scripts panel within InDesign.
I would not disturb you with learning to code by giving any suggestion right now until you ask for help. Happy coding
-Manan
Copy link to clipboard
Copied
Hi Manan,
I've been able to save the edited code. I want to place the pdf file at 0 and 1.75.
Copy link to clipboard
Copied
Hi Manan,
I figured it out. I had to go to the script file, get info and give myself permission to edit it. It was marked as Read Only. I changed it to Read and Write and now I can change where I want the pdf files placed in my InDesign document. I also learned that the code is written for x axis followed by y axis (as it should be).
Thank you for your efforts.
Maria
Copy link to clipboard
Copied
See the following link it should help as well
-Manan

