Hello! I recently downloaded the "add a blank page to the end of the document if the page count is odd" action for acrobat and now i need to add to it an instruction that rotates to 180 degrees every second page only if it and the one before are landscape, if they are both portrait or of different orientations, they should be left alone. Optionally, if the document contains x landscape pages followed by y portrait pages and x is odd, then a blank page should be added between the x landscape and the y portrait pages. But thats optionally..
Now i've been told i have to learn JavaScript for this. Im asking if there is a simpler, more accessible way to do it. If not, exactly what program should i get and maybe what book to look for?
You can't edit a .SEQ file directly (unless you can read the raw code) - you should import it, edit the action with Acrobat then re-export it.
Actions don't have any logic so you cannot do what you want with the inbuilt steps. It's only possible with JavaScript - you don't need extra software (beyond Acrobat) but if you've never written a JS program it's not a trivial thing to work out.
Someone might reply with a working code sample, but the general logic would be:
To run this against a whole bunch of documents you'd create a new Action, use the "JavaScript" step, put in the code and save it. Note that the JS step cannot tell the Action if the file has been changed or not, so every file you process will have to be re-saved.
Actually i have the whole code of this action in a text file, when i downloaded it it first opened in a new browser tab as a page with text, so i pasted it into a notepad doc. then i "saved as" it as a .sequ file from the browser. Thinking that to ask for someone to provide "the final product" for my need might be too much, i need to know how i can learn everything about JavaScript( commands, syntax and all that) thats required for the job. Oh and im not worried about it not being trivial, i really want to get it done.
On the overview page for this forum ( http://forums.adobe.com/community/acrobat/acrobat_scripting?view=overv iew ) there's a Getting Started box which has links to some tutorials and the Acrobat JS API reference documentation.
ok.. i may be too dumm or it may be too late( 02:00 for me now), but ive read much of those links and i dont see how i can learn from them all the names for variables, functions, procedures and all that needed for the job, i mean i need to know how the java language calls page, page orientation or page count for example and also the "verbs" that i believe are specific for acrobat only. i downloaded 1000 books and found 1(!) that takes me right from the basics with java and in a very general manner, i can work with that, all the others were about web java, web design stuff:( so how do i get specialized for acrobat? i would be very gratefull if you can enlighten me.
First, there is the Java language and the script JavaScript and they are very different items.
There are a number of free tutorials at Acrobat Users Community and most of the JavaScript tutorials are written by Thom Parker who runs PDFscrpting.com.
The page orintation is for viewing only. And if you were to modify the program for all possible situations, you would need to look at the previous page and deterimine its rotation and then rotate your added page as needed.
ok, let me ask you something else. i learned that if i right a script i can easily insert it in acrobat, but there must be an editor type program in which i can test my scripts while im learning. so please tell me its name so i can download it. at least thats the way i remember it from the c++ lessons i took in school. must be similar, right?
North America
Europe, Middle East and Africa
Asia Pacific