mlu

windows Extract single pdf / note from Enex file

10 posts in this topic

Today I accidentally deleted a pdf within a note. Not the note itself.

 

O, no problem I thought, it must be in the trash bin. But no. Seemingly such a partial change of a note is just thrown away.

 

As I take regular backups, it is basically not a problem to find it in a backup. But rather than importing several GB's of data (which would also eat several months of upload quota - I'm premium), so how to extract a single pdf from an Enex file?

 

Are there other possibilities to open enex other than using the Evernote client?

Share this post


Link to post

Today I accidentally deleted a pdf within a note. Not the note itself.

 

O, no problem I thought, it must be in the trash bin. But no. Seemingly such a partial change of a note is just thrown away.

 

As I take regular backups, it is basically not a problem to find it in a backup. But rather than importing several GB's of data (which would also eat several months of upload quota - I'm premium), so how to extract a single pdf from an Enex file?

 

Are there other possibilities to open enex other than using the Evernote client?

 

First, yes, note changes do not go to the trash.  Only when you delete the note. 

 

Second, there are a couple of ways to do this.  If you are a premium user, check the note history.  (Easiest)  Note history is taken once every ~ eight hours.  So if the correct note was synced on the EN servers for at least that long, there should be a copy in the note history.

 

Have you sync'd?  If not, try the web client.  If the PDF is still there, you can try opening it & saving a new copy to your hard drive.  Or you could try simply changing the note on the web client, so it's now considered the 'latest change'.  Then sync the Windows desktop  I would probably save the PDF to my hard drive & then change the note (by adding a line feed or space to the note itself) & sync.  This way, if the sync removes the PDF from the note on the web client, you still have the hard copy of the PDF on your hard drive.

 

OR...if the PDF in the note still resides on the EN servers, you can try emailing it to yourself.

 

If you're not premium, you can switch out your live database on your Windows desktop (be sure to backup your live database first!), select the note, export to enex.  Revert back to your live database & import the enex.   You can then merge the two notes.  IMO, this is easier than trying to simply export a PDF from the note itself. 

Share this post


Link to post

If you have a .enex file that has the PDF in it, then you can always just import that file into Evernote: File / Import / Evernote Export Files... It'll come in as a new note, and you can do what you want with the attachment.

Share this post


Link to post

As I take regular backups, it is basically not a problem to find it in a backup. But rather than importing several GB's of data (which would also eat several months of upload quota - I'm premium), so how to extract a single pdf from an Enex file?

 

If your method of backing up is creating an enex file of all your notes, then if you import the enex file, ALL notes will be imported. IIRC, importing puts all the notes contained in the single enex file in a single, local/non-sync'd notebook.  So you can find the note you're looking for & move it to a local notebook & then delete the newly created local notebook containing the rest of the notes you do not need.

 

When you said you make backups, I was thinking you backup your exb file, which (IMO) is the preferred (and certainly the most reliable, since it retains notebook information) method of backing up your Evernote database.

Share this post


Link to post

@BurgersNFries

 

Thanks for your suggestions about searching in note history and the website - if not synced. Haven't thought about this, but could have solved it for me. Unfortunately this client is non-premium, and I have synced (you learn from your mistakes!)

 

I was not quite precise in what I wrote about Enex - sorry about that. I take normal backups, so data are in exb-files. However, does that make it possible / easier to extract single notes/pdf's?

Share this post


Link to post

@BurgersNFries

 

Thanks for your suggestions about searching in note history and the website - if not synced. Haven't thought about this, but could have solved it for me. Unfortunately this client is non-premium, and I have synced (you learn from your mistakes!)

 

I was not quite precise in what I wrote about Enex - sorry about that. I take normal backups, so data are in exb-files. However, does that make it possible / easier to extract single notes/pdf's?

 

 

Ok, here's how to pull the note from your backup exb file.

 

  1. Fully exit EN.  Confirm no elephants in the system task bar.
  2. Confirm you've found your live exb file by looking at the last modified date.  (IE, if you've made new notes today, it should be today.)
  3. Disconnect your computer from the internet.
  4. Rename live exb file to something like your-username-20130415.exb  (this retains a copy of your LIVE database)
  5. COPY the backup exb file to your-username.exb
  6. Invoke EN.  It will now be looking at a copy of your backup.
  7. Find the note(s) you are looking for & select them.  Export them to enex.
  8. Fully exit EN.  Confirm no elephants in the system task bar.
  9. Rename your-username.exb file to your-username-delete-later.exb (or something like that.  I prefer copying rather than renaming or deleting in case you make a mistake - you're not destroying the original & can delete it later, when you're sure you no longer need it.)
  10. Copy your-username-20130415.exb to your-username.exb  This reverts back to your live database & keeps a backup copy as well.
  11. Invoke Evernote.  It's now using a copy of your live database. 
  12. Import the enex file.
  13. Reconnect to the internet.

That should do it.

 

Good luck!

Share this post


Link to post

...so how to extract a single pdf from an Enex file?

 

There are a couple of ways to do this that are not yet mentioned here.

 

1. Using a text editor that can handle very large files, open your enex file and do a text search for the note in question, either by providing some title text, body text or the name of the attachment.  Look at the note metadata to make sure you are at the right place.  Following the name of the attachment, search for 

<data encoding="base64">

Immediately after that will be the file encoded as base 64.  Copy this entire string until up to but not including the </data> tag.  May be very long depending on the size of the file.  You can then use any number of tools to decode base 64 data such as http://www.motobit.com/util/base64-decoder-encoder.asp to do the decode.  Paste that data in and save the binary file.  It should be a mirror image of the file you are looking for.  See https://blog.evernote.com/tech/2013/08/08/evernote-export-format-enex/ for details of the enex file format in case what you see differs from what I explained.

 

2. Do the same as in option 1 except that when you find the note, copy the entire note information and make a new text file, manually creating an enex file.  Paste that data into the new file and then wrap it in the proper enex document tags as shown in https://blog.evernote.com/tech/2013/08/08/evernote-export-format-enex/ .  Save the file and you will have the single note in a enex file of it's own.  Then import that.

Share this post


Link to post

 

@BurgersNFries

 

Thanks for your suggestions about searching in note history and the website - if not synced. Haven't thought about this, but could have solved it for me. Unfortunately this client is non-premium, and I have synced (you learn from your mistakes!)

 

I was not quite precise in what I wrote about Enex - sorry about that. I take normal backups, so data are in exb-files. However, does that make it possible / easier to extract single notes/pdf's?

 

 

Ok, here's how to pull the note from your backup exb file.

 

  1. Fully exit EN.  Confirm no elephants in the system task bar.
  2. Confirm you've found your live exb file by looking at the last modified date.  (IE, if you've made new notes today, it should be today.)
  3. Disconnect your computer from the internet.
  4. Rename live exb file to something like your-username-20130415.exb  (this retains a copy of your LIVE database)
  5. COPY the backup exb file to your-username.exb
  6. Invoke EN.  It will now be looking at a copy of your backup.
  7. Find the note(s) you are looking for & select them.  Export them to enex.
  8. Fully exit EN.  Confirm no elephants in the system task bar.
  9. Rename your-username.exb file to your-username-delete-later.exb (or something like that.  I prefer copying rather than renaming or deleting in case you make a mistake - you're not destroying the original & can delete it later, when you're sure you no longer need it.)
  10. Copy your-username-20130415.exb to your-username.exb  This reverts back to your live database & keeps a backup copy as well.
  11. Invoke Evernote.  It's now using a copy of your live database. 
  12. Import the enex file.
  13. Reconnect to the internet.

That should do it.

 

Good luck!

 

Is it not possible to search all the history notebooks at the same time? Using this method, you'd have to go one .exb file at a time. Which means you have to repeat steps 1-6 a lot of times, if you do not know when the pdf was deleted.

Share this post


Link to post

Is it not possible to search all the history notebooks at the same time? Using this method, you'd have to go one .exb file at a time. Which means you have to repeat steps 1-6 a lot of times, if you do not know when the pdf was deleted.

It is not possible to have multiple exb files open at the same time.

 

Deleted notes go into the trash.  Trash is not auto cleared.  I only rarely empty the trash.  Why should I?  When I do, I backup my exb file first.  So if the note you're looking for isn't in the trash, yeah, you'd need to work your way back.  But again, since I only empty the trash once or twice a year, it's NBD.

Share this post


Link to post

Devonthink Office will open .enex files, keeping all the info as it is in Evernote.  Pdf's are imported as pdf's, etc.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now