Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

marmiteturkey

macrumors 6502a
Original poster
Aug 27, 2005
846
821
London
I have a bunch of handwritten Apple notes (using the iPad Pro/Pencil) - I'd like to get them all into individual PDFs for importing/sharing/archiving. I can't find an AppleScript or similar that would do that - can anyone help? Printing individually would take an age; drag and drop doesn't work; and the only scripts I can find only deal with text or attachments.

Thanks,
MT
 

Cordorb

macrumors regular
May 8, 2010
211
50
I have tried an old program that does iPhone Backup extraction from your own non-protected backups

useful for extracting photos, videos, Photo Stream, call history, notes, contacts, calendars, SMS messages

Not sure if the notes were in PDF format
 

marmiteturkey

macrumors 6502a
Original poster
Aug 27, 2005
846
821
London
I'm back here and still don't have an answer to this - I found an old AppleScript but it has errors in it and I am in no way qualified to debug it :( - can't believe this isn't easily fixable - it must be something that people struggle with constantly? Without an easy way to bulk export handwritten notes, it's essentially off limits to me.
 

superscape

macrumors 6502a
Feb 12, 2008
933
222
East Riding of Yorkshire, UK
Hi,

I think the main issue is that there doesn't seem to be any way to tell Notes to output a PDF in the AppleScript dictionary. You can, however, get the name and contents of each note and add them to something that *can* be converted into PDF. Something like this very crude example I lashes together:

Code:
--start the HTML text
set theSourceHTML to "<html><body>"

tell application "Notes"
  
    activate
    set theNoteList to every note
  
    repeat with theNote in theNoteList
        --add to our HTML for each note
        set theBody to body of theNote
        set theName to name of theNote
        set theSourceHTML to theSourceHTML & "NAME: " & theName & "<br>BODY: " & theBody & "<p>---<p>"
    end repeat
  
end tell

--end the HTML text
set theSourceHTML to theSourceHTML & "</body></html>"

--write the html to file
do shell script "echo " & quoted form of theSourceHTML & " > ~/Desktop/notes.html"

--convert the html to pdf
do shell script "cupsfilter ~/Desktop/notes.html > ~/Desktop/notes.pdf"



...it goes through each note, gets it as html and then created a pdf from the html. You'll probably lose images and possibly lose some formatting, but I suspect that may be the best you'll get.

Hope that helps at least a little.
 

chown33

Moderator
Staff member
Aug 9, 2009
9,890
6,864
Beyond the pale
...it goes through each note, gets it as html and then created a pdf from the html. You'll probably lose images and possibly lose some formatting, but I suspect that may be the best you'll get.
I see that Notes on a Mac can import formats like rtf and rtfd. This suggests it's using the Cocoa text conversion system.

There's a command-line tool that supports those same conversions: textutil.

Maybe if Notes can be told to export as rtfd (or a similar format), that can be processed by textutil into HTML (or similar), and then converted to PDF through the cupsfilter as shown above.

I don't have any Macs here running the Notes app, so I can't explore this myself.



On a different note, it might help us make more progress if the OP were to post the exact URL of the script that doesn't work. He says he can't debug it, but that doesn't mean no one else can. However, he's the only one who knows what that script is, which does mean no one else can do anything with it until he tells us exactly what the script is.
 
  • Like
Reactions: superscape

forrie

macrumors regular
Mar 6, 2008
131
96
I just wonder why Apple didn't include a simple function to print multiple, selected notes into one PDF. That seems so obvious of a need.
 
  • Like
Reactions: BigMcGuire

Raymond32

macrumors newbie
Jul 2, 2019
25
40
Taipei
There're many 3rd party apps might fits your needs --
1) DEVONthink Pro 3
2) Bear(available on App Store)
3) Keep It 2(available on App Store)
4) Export(available on App Store)

I use DEVONthink Pro 3 at the moment. Still looking for better answer up until now.

Comparison, FYR.
 

Slartibart

macrumors 68020
Aug 19, 2020
2,163
2,175
While I think that the OP wanted the possibility to automate the PDF export for several notes, saving individual once as PDF is straight forward - at least on iOS/iPadOS 15:
  1. In Notes, open any note to export as a PDF.
  2. Once in the note, tap the ellipsis () icon at the top.
  3. Select Send a Copy.
  4. Tap Markup to generate a PDF. Markup your document or not. ?
  5. Once you're happy with your PDF, tap Done. Apple Notes will ask you to save your PDF.
  6. Tap Save File To and select an appropriate location on your iPhone or iPad.
  7. Finally, Save.
 

gustavoarcanjo

macrumors newbie
Aug 2, 2022
1
0
There is no way to go that at the moment.

The fastest way I could export several Apple Notes to PDF was by opening Notes on my Mac, then setting up a shortcut for the “Export as PDF…” menu action to something like Cmd+S, and then clicking each note one by one, pressing down Cmd+S tô generate the file and saving.

I hope this basic feature is added in the future.
 

chabig

macrumors G3
Sep 6, 2002
9,983
7,354
I found an app on the App Store that purports to export to pdf.

 

f54da

macrumors regular
Dec 22, 2021
113
47
I think the two general approaches are exporting via applescript scripting, or accessing the notes db directly. The latter used to be possible on <= 10.10, not sure if anyone's determined the storage format on later versions.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.