Wednesday, January 24, 2018

#1 2006-06-08 04:48:06 pm

Chuckles66
Member
Registered: 2006-04-26
Posts: 66

Acrobat 7 pro printing script now not working

I had a script set up to print all pdfs in a list and it worked fine on acrobat 6 on panther, but I reciently upgraded to acrobat 7 on tiger and now it doesn't. Here is the one that worked. I have checked the dictionary and according to that it should work.
I REALLY NEED THE SOLUTION TO THIS AS IT MAJORLY AFFECTS MY WORKPLACES WORKFLOW.
[applescript]
--if application "Finder" is frontmost then
I have something else that defines the PDF list
set aCount to count (every item in listOfPDFs)
tell application "Adobe Acrobat 7.0 Professional"
    activate
    if aCount > 0 then
        repeat with i from 1 to aCount
            open item i of listOfPDFs
            print pages front document with shrink to fit
            close front document
            delay 0.5
        end repeat
        display dialog "Printed all selected Dummy pages" giving up after 10
    end if
end tell
--end if
Please help.

Last edited by Chuckles66 (2006-06-08 08:38:56 pm)


Filed under: adobe

Offline

 

#2 2006-06-08 09:07:25 pm

pidge1
Member
From:: Leeds-England-UK
Registered: 2005-08-06
Posts: 627

Re: Acrobat 7 pro printing script now not working

Hi

From what i can gather the print bit of acrobat scripting is not working under version 7
have you tried to use the batch processing option actually in acrobat 7 this might work.


pidge

Offline

 

#3 2006-06-08 09:25:21 pm

Chuckles66
Member
Registered: 2006-04-26
Posts: 66

Re: Acrobat 7 pro printing script now not working

That is not really an option as: a. the script is innitialised from the finder  b. it is attached to a hot key   and  c. I don't like to open all the documents in one go. I open them in sequence. If there is a way to do all that then cool. But at this stage I just want to repair the current script. Thanks for the suggestions though as I have used it as a temporary solution.:D

Offline

 

#4 2006-06-11 04:18:50 pm

Chuckles66
Member
Registered: 2006-04-26
Posts: 66

Re: Acrobat 7 pro printing script now not working

I am posting on this to get it to the top of the list as I really need an answer for this and I get the feeling that most people only look at the posts on the first page. I'm sorry if this breaks forum rules or something.

Offline

 

#5 2006-06-12 01:36:51 am

Kevin Bradley
Administrator
From:: Independence, MO
Registered: 2006-03-13
Posts: 548
Website

Re: Acrobat 7 pro printing script now not working

This might seem like a dumb question, but can you go back to Acrobat 6?  Or is it not Tiger compatible?

If that's not an option, can you tell us what doesn't work?  Do you get an error or does Acrobat just not print the page?  If you can, try running the script within Script Editor, it may give you more info about what is going wrong.

(second dumb question: it's not something like needing to set printer prefs in Acrobat first is it?)


Nitewing '98
--
I distrust morning people, largely because I suspect them of getting together early one day while the rest of us were asleep and setting up the rules of civilization.

Offline

 

#6 2006-06-12 04:40:14 pm

Chuckles66
Member
Registered: 2006-04-26
Posts: 66

Re: Acrobat 7 pro printing script now not working

To answer your not dumb questions.
1. Due to my lacking in administrator privilages (and influence), going back to 6.0 is not really an option.
2. The only part of the script that doesn't work is

Applescript:

print pages front document

I have put it into any combo I can think of and also inside tell blocks as you can see from my prevous entries. I have been reading around and a lot of people think the "print pages" function in acrobat 7 is stuffed. Programming glitch on adobes part.
3. I have checked all the prefs and read up on the dictionary and according to them it should work. So now I am looking for a way around it. Is there a way to use System Events to achieve the same result? All I am doing is printing single page pdfs from a finder defined list.
Thanks for the suggestions though.
Any thoughts?:D

Offline

 

#7 2006-06-12 07:03:35 pm

digest4d
Member
From:: Northampton, MA, USA
Registered: 2004-01-26
Posts: 389
Website

Re: Acrobat 7 pro printing script now not working

Does the script give you an error message? What happens if you tell Acro to set x to name of front document? (I.e. is it the print pages or the document reference part of that line that's causing the problem?)

Offline

 

#8 2006-06-12 11:32:33 pm

Chuckles66
Member
Registered: 2006-04-26
Posts: 66

Re: Acrobat 7 pro printing script now not working

This is the syntax as I wrote it:

Applescript:

tell application "Adobe Acrobat 7.0 Professional"
   activate
   print pages of front document with shrink to fit
end tell

ends with error msg: Adobe Acrobat 7.0 Professional got an error: document 1 doesn't understand the print pages message.

The thing is this exact syntax used to work with Acrobat 6.
I tried setting the doc name to a variable but no dice. The error occurs with print pages command.
I tried just regular old print but nothing. I have never scripted System Events before so I wouldn't know where to start with that, but it seems to be the next best option.


Filed under: adobe

Offline

 

#9 2006-06-13 10:59:39 am

Matt-Boy
Member
Registered: 2005-10-21
Posts: 480

Re: Acrobat 7 pro printing script now not working

Wow, I just experimented a bit with this and it appears that the "print pages" feature is totally broken in 7.

Not that that helps, but just to confirm that you are not getting a weird error or just not wording something correctly.

I searched a few different sources and couldn't find anyone with an answer.

Offline

 

#10 2006-06-14 04:13:33 pm

Chuckles66
Member
Registered: 2006-04-26
Posts: 66

Re: Acrobat 7 pro printing script now not working

Umm...thanks. Its good that its not just me. I am going to start a new thread about printing PDFs through system events.

Offline

 

#11 2006-06-15 06:46:19 pm

Chuckles66
Member
Registered: 2006-04-26
Posts: 66

Re: Acrobat 7 pro printing script now not working

The solution:

Applescript:

print pages active doc PS Level 3 with shrink to fit

So simple. Damnit.
Thanks to all that helped and especially to Jan for providing me with the solution.:D:D:D

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)