Hi everyone,

I could need a little help with scripting for pdfEdit. From time to time 
I do use pdfEdit to cut away the white, unused page borders, so that the 
actual content better fits the screen of my eBook reader. I've done this 
on the GUI so far, but usually it's quite a couple of files in a row, so 
I would like to have batch procession. Here is what I've written so far, 
with border values for a specifc set of scientific papers:

pages=document.getPageCount();

for (pageNo = 1; pageNo <= pages; pageNo++) {

         print(pageNo);

         
document.getPage(pageNo).setMediabox(42.51968503937008,56.69291338582678,569.4803149606299,735.3070866141734);

}

document.save()

closeAll()



This actually works fine when invoked by "pdfedit -run script 
paper.pdf". The problem I experience that pdfedit does not exit properly 
and I always have to Press Ctrl-C on the shell. The job has finished 
correctly by then, but I in batch processing, I would have to intervene 
for every file which is kind of annoying.

Am I missing some command to quit pdfedit? From the document I thought 
closeAll() should do just that but I was also trying quit() and exit() 
to no avail.

Got any clues for me?

Best Regards,
Michael Klimczak

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Pdfedit-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdfedit-support

Reply via email to