Applescript / Javascript > Adobe Acrobat scripting

76page PDF needs splitting into 38 two page PDFs

(1/2) > >>

not sure if i need a script to achieve this but you resident geniuses will know whats possible or if there is another way.

I don't have a clue about applescript,  apart from using a couple that Larsen67 has sent me for quark or I've downloaded for InDesign, so I'm probably after really basic instructions of how to implement it too. I don't recall seeing an applescript icon in the Acrobat toolbar.

I need to split out page1&2 as the first pdf then page3&4 as the second pdf and so on.

I'm using Acrobat7 Professional on OSX10.4.11 (but Acrobat8 Professional is available to me on 10.4.11 or Acrobat Pro 9 on 10.5.7)

Jean-Marie Schwartz:
If the file you have shows really as 1 single page for pages 1 & 2, what you could do is manually to crop every page, save the resulting pages as say Odd_pages, then Apple-Z to recover the original PDF and crop again the other side so you get every even pages. Then gather both of them. Are you with me?

Glenn, you could try this?

001   property Default_Path : (path to desktop folder as Unicode text) as alias
002   property JavaScript : "var re = /.*\\/|\\.pdf$/ig; var filename = this.path.replace(re,''); try { for (var i = 0; i < this.numPages;  i = i + 2) this.extractPages( { nStart: i,  nEnd: ( i + 1 ), cPath: filename+'_' + ( i + 1 )  + '-' + ( i + 2 ) +'.pdf' }); } catch (e) { console.println('Aborted: '+e) }"
003   --
004   set The_PDF to choose file default location Default_Path
005        with prompt "Where is the multi-page PDF?" without invisibles
006   --
007   tell application "Adobe Acrobat 7.0 Professional"
008        activate
009        open The_PDF
010        tell active doc
011             with timeout of 300 seconds
012                  do script JavaScript
013             end timeout
014             close saving no
015        end tell
016   end tell

Sorry to be away for so long. Thanks for trying to help.

Hi Jean-Marie
I'm afraid I'm not with you, have you been on that virtual Belgian Beer again ;D
I just needed 38 individual pdfs, each with 2 pages.
I start with 38 pdfs each 2 pages. My RIP turns these into 76 individual pdfs (38 fronts and 38 backs) and can quickly combine into one PDF containing 76 pages. When its just one file I need to do a whole bunch of global amends but then need to split it out back into twos again because the client can't use ftp and has a small email limit.

Hi larsen
Ok for dummies like me how do i turn your text into a script and try it.

Locate 'Script Editor' this app should by default be in Apps/AppleScript launch it then C&P the 16 lines of code into the new doc window. Then remove the first 3 digits of each line of code once done click the 'compile' button at the top if you don't have "Adobe Acrobat 7.0 Professional" it will ask for you to locate an alternative app so navigate/pick what you have installed Versions 6,7,8,9 of PRO should be able to run this. Once the code is compiled you can just save it as a script file to pretty much where you want. You should just be able to run it directly from within 'Script Editor' The spreads will be saved to the same location as the file you choose when prompted. You may need to turn on 'Enable Acrobat JavaScript' first NOT sure on that. Hope it works OK 4U.


[0] Message Index

[#] Next page

Go to full version