The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraffle > OmniGraffle General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

AppleScript save as PDF - how can I get the whole page? Thread Tools Search this Thread Display Modes

I am trying to export a PDF using AppleScript and OmniGraffle 5.0.2.

My document has a canvas size of 8.5"x11"
If I print to PDF manually using the menus in OmniGraffle, I get a PDF that is a full-size page.

When I save to a PDF file using AppleScript, the image is cropped to a size just big enough to fit the objects (not the full size of the page). How can I get the save to PDF in AppleScript to generate a PDF that is the full page size of the document (e.g. the same as what I get when I print to PDF)?

Here is a simplified script that is generating the PDF that is cropped to include just the shapes:

tell application "OmniGraffle Professional 5"
open file "Macintosh HD:testfile.graffle"
set theDocument to front document
save theDocument in "Macintosh HD:testfile.pdf"
end tell

I've hunted around, and have not come across an example or documentation that explains how to save an OmniGraffle document into a full-size PDF document.

If you know how to export full canvas-size PDFs, please post an AppleScript example, or please point me to the appropriate documentation.
I believe if you stick the following argument in your code:

set area type of current export settings to current canvas

You'll get what you're after here.

Hope that helps,
"Vroom! Vroom!!"
That worked, perfectly. Thanks, Joel!

Happy Halloween!
I have the opposite need, I think.

I am creating a bunch of drawings for a book. I want the PDF of each drawing to be just the size of the canvas in that drawing. Failing that, just the size of the objects in the drawing would be OK.

I also want to customize the default size of the canvas to be suited to the book width.

How can I do these?
Umm... bumplet? Is there any easy way to do this? Thanks.
Originally Posted by Sophie View Post
Umm... bumplet? Is there any easy way to do this? Thanks.

the forums are provided primarily for users to interact with each other, and while various Omni folk like Joel do attempt to keep up with the traffic as time permits, if you need their help, you should use Help->Send Feedback or email which will make sure that it is seen and answered in a timely fashion. It does have the unfortunate side effect that the rest of us probably won't learn from your question, but sometimes you need to be the most important :-)
Thanks whpalmer, I hope my post did not seem pushy as it was not intended to be :-)
Didn't seem pushy at all to me, I just wanted to help you get a timely answer to your question. Joel and others from Omni post often enough that it's easy to get the impression that any and all questions here will be seen and promptly answered, but it isn't always so.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
How I save a perspective with AppleScript? kroger OmniFocus Extras 2 2012-03-23 11:56 PM
How do I change the font in every page of a multi-page doc? (Applescript?) Andrew N OmniGraffle General 4 2008-08-20 07:16 PM
Applescript save? wblj OmniOutliner 3 for Mac 3 2008-07-02 12:30 PM
Save page as pdf (or png, jpg)? Handycam OmniWeb General 8 2007-07-28 04:03 AM
Applescript to save and export as pdf brab OmniGraffle General 0 2006-08-10 01:20 AM

All times are GMT -8. The time now is 08:34 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2023, vBulletin Solutions, Inc.