Automator & AppleScript: How do I import the texts of Notes and Reminders as PDFs and RTFs? I would like to export and save the Notes and Reminders documents or texts as PDFs and RTFs, keeping or preserving the formatting and the background of Notes or Reminders, but the Notes doesn't have the option.

I would like to know if it's possible to use Automator and AppleScript to export the Notes and Reminders as PDFs and RTFs.
Another way to export notes is to move them to an email account first. For example:


Move notes to a Gmail account in Notes.app
Move the notes to some other folder in Gmail's web interface
Select the notes in Mail.app and save them as rich text or plain text


Here is another AppleScript for exporting notes as RTF:

set i to 1
tell application "Notes"
    repeat with n in notes
        do shell script "printf %s " &amp; quoted form of (get body of n) &amp; " | textutil -inputencoding UTF-8 -format html -convert rtf -stdin -output /tmp/" &amp; i &amp; ".rtf"
    set i to i + 1
    end repeat
end tell


It doesn't keep images, and it doesn't work with notes that are longer than getconf ARG_MAX. -inputencoding UTF-8 is required for preserving U+100 and characters above it.