Tuesday, November 06, 2007

Which are the document types used by Pages in Applescript?

The document types used by Pages under Mac OS X 10.5 (Leopard) are defined in the Pages package Content/Info.plist under the tags CFBundleDocumentTypes > [a number] > CFBundleTypeName. They are the following ones:
  • SLDocumentTypeRichText
  • SLDocumentTypeRichTextBundle (rtfd)
  • SLDocumentTypePlainText
  • SLDocumentTypeSimpleText
  • SLDocumentTypeMSWord
  • SLDocumentTypePDF
  • SLDocumentTypeAppleWorks
Not all of them can be used in Applescript to export documents. There are the same limitations as for Export using the Share > Export dialogue. To see how they can be used, see this example.

No comments: