How to save a quark document as PDF

Discuss AppleScripting for QuarkXPress 10, 9 & 8 (and before)
nellbern
Posts: 6
Joined: 14 Nov 2006, 16:57

How to save a quark document as PDF

Post by nellbern » 10 Jul 2008, 08:01

Thanks Larsen for your reply. With the info you gave me about the PDF Boxer I search in this site & discover that the PDFBoxer XT is no longer necessary in QuarkXPress 7 as it's functionality is now built in. Based on Dave Ebersole from Quark the XTension only injected pdfmarks for Crop, Trim and Bleed into the Postscript generated when using the File > Export > Layout as PDF path. QuarkXPress has never generated any pdfmarks for these boxes when generating PostScript from the Print Dialog.What Quark have discovered that in previous versions, Acrobat Distiller could reverse-engineer our PostScript and inject these into the resulting PDF. Something has changed that has broken Acrobats ability to correctly inject these boxes. So if I make PS & Distill route NO PDFBoxes are injected in the final in the PDF and Export Layout as PDF is not scriptable although if I use UI scripting it works but I cannot get default PDF output settings to stay. I can modify the "Default PDF Output Style" but it doesn't help because "Captured Settings" is always the default when the Export dialog comes up (the "Default PDF Output Style" is not used as the default, "Captured Settings" is). Go figure

Scripting_Ace
Posts: 684
Joined: 29 Jun 2004, 13:14

How to save a quark document as PDF

Post by Scripting_Ace » 10 Jul 2008, 09:08

Hi Nelbern,
Acrobat makes it really easy to script the additon of "PDFBoxes". Maybe this is something worth looking into...
tell application "Adobe Acrobat Professional"
tell every page
set crop box to {36,819,639,36} -- {Left,Top,Right,Bottom}
set bleedbox to {27,828,648,27}
end tell
end tell

nellbern
Posts: 6
Joined: 14 Nov 2006, 16:57

How to save a quark document as PDF

Post by nellbern » 10 Jul 2008, 11:50

Definitely this is something worth looking into but if I have a pdf created with registration marks how can I keep them? Also since I'm still learning applescript the numbers {36,819,639,36} -- {Left,Top,Right,Bottom} what are those? They are not inches, pixels. Please advise me

Scripting_Ace
Posts: 684
Joined: 29 Jun 2004, 13:14

How to save a quark document as PDF

Post by Scripting_Ace » 10 Jul 2008, 17:40

nellbern wrote:Definitely this is something worth looking into but if I have a pdf created with registration marks how can I keep them? Also since I'm still learning applescript the numbers {36,819,639,36} -- {Left,Top,Right,Bottom} what are those? They are not inches, pixels. Please advise me

Actually, setting those PDFBoxes does not resize your document as it did in previous versions of Acrobat. Your are in effect only setting guides that bears a special meaning. I do not use those pretty much and seeing you want them probably means you know more about them than I do.
Ok now for the bounds of those boxes; Adobe considers the bottom left to be the origin of their documents. So in my example, simply imagne dragging guides to the specified values (Which are in points BTW). You would drag:
[ulist][*]The LEFT guide 36 pts in form the left side of the page;[*]the TOP guide 819 pts up from the bottom of the page;[*] the RIGHT guide 639 pts in from the left side of the page;[*]the BOTTOM guide 36 pts up from the bottom of the page.[/ulist]The area delimited by this guide is the created PDFBox. You can repeat a similar process for BLEED, TRIM, ART and MEDIA boxes. By default, every one of those boxes are set to match the whole document. You can then query the default value first:
set {L,T,R,B} to crop box of page 1
then to set the crop box 36 pts inside the current page borders you smply need to
set crop box of every page to {L+36,T-36,R-36,B+36}

Hope this helps!

nellbern
Posts: 6
Joined: 14 Nov 2006, 16:57

How to save a quark document as PDF

Post by nellbern » 11 Jul 2008, 03:19

It does help. As usual many thanks ScriptingAce.

scottws
Posts: 38
Joined: 28 May 2004, 15:52

How to save a quark document as PDF

Post by scottws » 11 Jul 2008, 06:29

This is a weakness of the new forum setup - I always go to "Unread Posts," and the sub-forum is not listed. I gave an bad answer at one point as well, not noticing I was in the Applescript section.Anyone else think this needs to be fixed?

fondomatic
Posts: 0
Joined: 11 Dec 2008, 16:59

How to save a quark document as PDF

Post by fondomatic » 12 Dec 2008, 02:21

With regard to QuarkXPress 7:

When I export a layout as PDF via A) AppleScript, or B) XTensions XDK my resulting PDF files, when opened in Acrobat, display trim & bleed boxes with incorrect coordinates. When I manually export the layout as PDF, Acrobat displays the trim & bleed boxes in the correct locations. This seems to confirm what nellbern has stated in his post.
Before I continue this post, I'd first like to acknowledge the workaround posted by Scripting_Ace. I've read many postings by the erudite Michel, and would just like to thank him for posting this and so many other solutions here & in other locations. His contributions to the scripting community are invaluable and I just wanted to thank him here for it.
His solution, however, will be my last resort, as I'd prefer to avoid post-processing the files as opposed to generating them properly. But sometimes, you gotta do what you gotta do. That said...
I noticed that once I have manually exported the layout as PDF, if I save changes to the project, I can then subsequently export the layout via AppleScript or my XTensions Software with correct trim & box geometry. Something is getting changed in the project file. My desperate hope is that someone can tell me how to make this associated change to the project via AppleScript or via my XTensions Software code so that I can do so before exporting the PDF.
I have investigated EACH & EVERY ONE of the values in the print setup and document properties via AppleScript, an compared them to the UI elements in the Export Layout As PDF interface in the hopes of finding a discrepancy, yet failed to do so. At this point, I have only two desperate options which I will be glad to detail here if anyone is in a similar situation, but neither of them are pretty (or efficient).
In particular, I'd be most grateful if Mr. Dave Ebersole could commment on this issue.

Thank You for your time.
Ron Fondo
ron@theprintinghouse.com

fondomatic
Posts: 0
Joined: 11 Dec 2008, 16:59

How to save a quark document as PDF

Post by fondomatic » 17 Dec 2008, 07:25

I guess this thread died...

Post Reply

Return to “QuarkXPress 8, 9 & 10: AppleScript”