[texworks] SCRIPTING: get current poppler page number

Paul A Norman paul.a.norman at gmail.com
Fri Oct 22 02:46:32 CEST 2010


Thanks for that,

I am also out of my league with MAC stuff but intuitvely :) something
towards (I know its wrong) ...

using a second parameter to be the page number - not sure what
"basename" is should we have say pagenumber or is baseanme a directive
of some sort? `pwd' looks like it returns the path from a system call

     #!/bin/bash

       PATH="$PATH:/usr/texbin:/usr/local/bin"

       name=$(basename "$1" .pdf)
       basefname="`pwd`/${name}"

       page=$(basename "$2")

       /usr/bin/osascript << END
       tell application "Adobe Acrobat Pro"
               activate
               open POSIX file "$basefname.pdf" options "page=$page"
       end tell
       END

Yep, I too await those who know how to peel it right and spit out the pips :)

Paul

On 22 October 2010 01:41, Bruno Voisin <bvoisin at me.com> wrote:
> Le 21 oct. 2010 à 14:39, Bruno Voisin a écrit :
>
>>  (I imagine the SDK prohibits copying the code here).
>
> I meant the EULA, not the SDK, sorry.
>
> Bruno
>
>
>



More information about the texworks mailing list