Re: Printing File to PDF from Native Application
Re: Printing File to PDF from Native Application
- Subject: Re: Printing File to PDF from Native Application
- From: Scott Ribe <email@hidden>
- Date: Tue, 09 Dec 2008 09:56:53 -0600
- Thread-topic: Printing File to PDF from Native Application
One more thing, if MS Word 2004 is one of your targets, there are more
things to be aware of:
- If Word is set to display the "project gallery" on launch, which is the
default, it will ignore your request to open/print files, so this preference
has to be turned off.
- Occasionally Word will decide that its default template has been modified
and display a modal dialog until the user dismisses it, or forever,
whichever comes first. If Word is not the foreground application, it will
not come to the front and the modal dialog will not be visible to a user. If
you want this to be fully automated, you have to implement a timeout and be
willing to kill Word--but if you kill Word while a user has their files
open, autosave might or might not recover their files when Word is
relaunched. If you want to run this on a workstation where a user might be
using Word, you want to use the Process Manager to bring Word to the front,
rather than trying to use AppleScript.
- Occasionally Word will spontaneously reset the "show project gallery at
startup" preference. Also it will occasionally corrupt its preferences and
crash on launch. So if you want fully automated operation you need to
configure Word the way you want, copy a couple of preferences files into
your application bundle, then replace Word's prefs with your pristine copies
each time you launch Word--and, oddly enough, pause briefly between the copy
and the launch...
- And if you don't want Word to randomly crash, it's good to script it to
quit and then relaunch it every so many documents.
Yes, someday soon I hope to try integrating Word 2008 to see if it's more
reliable--but I'm not looking forward to that task ;-) But it does work. I
do have a an automated process on a server which converts MS Word documents
to PDF with absolute fidelity.
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden