PDF output style not working

Discuss AppleScripting for QuarkXPress 2015, 2016 & 2017.

PDF output style not working

Postby josema » 26 Dec 2017, 11:18

Hi, I’ve been using Quark Xpress 2016 for some time now to automate with Applescript the production of PDFs with customized information. I recently upgraded to Quark Xpress 2017, and now some of my applescripts will no longer work. Specifically, when including the optional “page range” or “PDF output style” clauses. As an example; something like this used to work in Quark Xpress 2016:

export document 1 in (path to desktop folder as string) & "test.pdf" as "PDF" PDF output style "Press - High Quality/High Resolution"

But all I get now is a Syntax Error saying:

A identifier can’t go after this “"”.

If I remove the output style specification the script does indeed work, but I need to be able to select the PDF output styles in order to generate documents for different purposes.

The QuarkXpress 2017 Applescript dictionary seems to indicate that the optional clauses should still be recognized. Has anything changed with AppleScript in QX2017 or am I doing something wrong?

QuarkXpress 2017 13.1.1 (29230), macOS High Sierra version 10.13.2

Thanks in advance.
josema
 
Posts: 3
Joined: 25 Dec 2017, 16:31

Re: PDF output style not working

Postby pjanssen » 28 Dec 2017, 04:51

Well, it has something to do with the name of the PDF output style.

I did try your script and entered the name of the output style by hand and it failed. I then duplicated a standard output style and copy & pasted the name into the script. This time the script worked. I then tried to remove the last part of the name (deleted " copy"). Now the script also works.
pjanssen
 
Posts: 132
Joined: 31 Dec 1969, 19:00

Re: PDF output style not working

Postby josema » 28 Dec 2017, 13:40

Thank you very much for taking the time to look at this. I tried replicating your process in my setup but the results were the same. I duplicated the output style and copied the name into the script, but the problem here seems to lie with the “PDF output style” clause not being recognized, because when I try to run it from the Script Editor, it fails with a Syntax Error stating that it “Expected end of line, etc. but found identifier.” While highlighting the “PDF” part of the “PDF output style” clause. It won’t even compile with the hammer tool. This is all a bit baffling to me, especially since these scripts used to run fine with QX2016. If I can’t get this to work as expected I’m thinking I could probably cobble something up by manipulating the UI with System Events to have the script choose a PDF style on the fly from the pop up menu, or maybe re-installing QX2016, which would pretty much defeat the purpose of purchasing the upgrade. Quick question though; Did you run your script on QX2017 with macOS High Sierra? Maybe my problem occurs only with this specific setup.
josema
 
Posts: 3
Joined: 25 Dec 2017, 16:31

Re: PDF output style not working

Postby pjanssen » 29 Dec 2017, 11:34

I did run the script with the same version of QuarkXpress 2017 as you, but on a different OS: El Capitan. Unfortunately I can't test on Sierra or High Sierra. So it's High Sierra specific. Maybe you could report this bug directly with Quark or otherwise in the Facebook group.
pjanssen
 
Posts: 132
Joined: 31 Dec 1969, 19:00

Re: PDF output style not working

Postby josema » 30 Dec 2017, 01:16

Thank you, that’s very helpful, this really might be a High Sierra-specific issue. I’ll see about filing a report as you suggested. Thanks again & a very happy New Year!
josema
 
Posts: 3
Joined: 25 Dec 2017, 16:31


Return to QuarkXPress 20xx: Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron