How can I copy text from PDF and include the source filename in the pasted selection?

I'm a biologist and frequently cut-and-paste notes from PDFs of scientific articles.  I name all of the PDF articles with their PubMed ID, a short unique identifier (e.g. 19397482.pdf).  When I take notes, I will select a few sentences from the PDF and then paste them into a text editor for later reference. 
Can anyone suggest a method or script that would allow me to paste the copied text with the Pubmed filename included in a single action?  I would want the pasted output it to look something like this, with the filename appended to the end:
Of the transcripts that were significantly different, there was a greater number of transcripts that were down-regulated in the IVC embryos (380) than the number of transcripts that were up-regulated (208).  [20668257.pdf]
This would really help me to properly cite information sources during the writing process.  I know there are bibliography managers that might be able to do something like this, but I prefer to read the PDF articles directly in Preview and select the text as I am reading. 
Thanks very much for any suggestions / ideas.
jjw

To copy and paste in a single action:
tell application "Preview" to activate
tell application "System Events" to tell process "Preview"
    -- Get the PubMed ID:
    get the title of the front window
    set thePubMedID to word 1 of result
    -- Copy the selected text to the clipboard:
    keystroke "c" using {command down} -- ⌘C
    delay 0.25 -- adjust if necessary
    -- Add the PubMed ID to the contents of the clipboard:
    set theNotes to the clipboard
    set the clipboard to (theNotes & space & "[" & thePubMedID & ".pdf]")
end tell
tell application "Notational Velocity" to activate
tell application "System Events"
    -- Paste the contents of the clipboard to the end of the Notational Velocity document
    key code 125 using command down -- ⌘↓
    keystroke return & return
    keystroke "v" using {command down} -- ⌘V
end tell

Similar Messages

  • How can I copy text from Pages and paste as Unicode?

    I notice that if I write a Pages document on my iMac (this is Pages 09 running under OSX Mavericks 10.9.1) and copy text that contains characters from the "Mac Roman" character set (like the Greek letter pi for example, and some other mathematical symbols), if I paste it into a text file on a PC (I'm running the Mac with Windows via Parallels), then these characters don't show up correctly. If they were copied as Unicode characters then I don't think the problem would exist. I thought that Pages used Unicode, but it doesn't apparently apply to stuff that gets onto the Mac clipboard. I do know that if I export a whole Pages document it is possible for it to be exported in Unicode, but I just want to copy small bits of text like mathematical formulae and paste them into Unicode-compliant applications. Is this possible? There's nothing in the Pages Preferences to suggest that it is. Is there any solution to this?
    TIA

    Tom, I'm sorry I think I have wasted your time. My initial experiments seemed to show that what I was trying to do didn't work, but now it all seems to work. No idea why. I think there is a problem somewhere, but not where I thought it was. I think what may be happening is that when the Mac clipboard sees some Mac Roman text, it converts and stores it in Unicode form, so things work as long as the receiving app is Unicode aware - or Parallels is doing the job for me, or Pages is. Good if this is true. The only issue then would be that, if a program for the PC is looking for characters by their encodings, it will have to use the Unicode ones to find things, whereas the equivalent code on a Mac will have to look for the Mac Roman encodings as well as Unicode.
    Just to explain, I am not using a specialised mathematical formula editor, but I do expect my user to use the math symbols easily accessible on the Mac keyboard, particularly the Greek letter pi (lower case), division sign, less than or equal to, greater than or equal to, square root. The user can type text directly or paste it in from another application. On the PC side I am not using Microsoft Word but a program I'm developing that can create fields into which I can put text, similar I suppose to NotePad. Just to be able to be cross-platform, I expect users to use the built-in Windows Character Viewer or similar to make the same symbols accessible as in the Mac version.
    If everyone was using Unicode the problem (if there is one) wouldn't exist.
    I may well come back with a similar issue in the future, but my original issue, although the description was given in good faith, seems to be wrong. So I'm saying the problem is solved.

  • How can I copy text from pdf file to Pages or Word?

    I recently changed to Lion. When I try to copy pdf text from either Preview or Adobe reader into either Pages or Microsoft Word I get all undecipherable characters. This did not happen in previous OSX versions. Is there a fix?

    I have found that some pdf's are "protected" so that it is not possible to copy text. Does this happen to all your pdfs, or just some?
    If it is just some of the pdfs, then this might help:
    http://hints.macworld.com/article.php?story=20040622214927503
    charlie

  • HT2523 How can I copy text from TextEdit without including formatting?

    This is not the most important question in the world, but I would like to skip the extra paste and cut into the Address bar of Safari to get rid of text formatting. Is there a way to do something like cmd + shift + c to just copy the text?

    It's not the copying, but the pasting where you can remove formatting. In most mac apps you can use Shift + Alt + Cmd + V to paste with the formatting of the target.
    If you want that to be the default behaviour, you can use this trick.

  • How can I copy text from one card to another while creating cards using Iphoto?

    I created two cards with different pictures using Iphoto on Macnotebook. 
    I want to use the same text message.
    How can I copy text from one card to another?

    select the text and copy (edit menu ==> copy) tehn gpo to the next card and paste
    LN

  • HOW CAN I IMPORT TEXT FROM MICROSOFT WORD TO THE WEB PAGE?

    HOW CAN I IMPORT TEXT FROM MICROSOFT WORD TO THE WEB PAGE?

    Another method is tosave your Word document as an a web page.  Then open the htm file, copy the text and paste into an HTML snippet on your web page.  Resize to show all the document and publish. It will retain the style, font and alignment of the original Word document.
    OT

  • Can't Copy Text From PDF Within Gmail Preview

    Hi,
    If I click on a pdf attachment while inside gmail, I get the expected preview window of that PDF. However, I can't copy text from it. If I press Command-C, it just makes a beeping noise letting me know nothing is being copied. If I select text and right-click, there's no 'copy' option. Also, in the top toolbar, Copy is greyed out in the Edit menu. However, if I just hold down Command-C for a couple seconds the text will copy anyways (while hearing a dozen audible beeps). I can copy text without issue using Firefox from the same PDF attachment preview inside Gmail.
    Thanks for any help.
    Yosemite 10.10.1
    Safari Version 8.0 (10600.1.25.1)

    Having same issue as well. I've had this problem pre-Yosemite and it seems to be Safari related. Copy to clipboard in Gmail preview works fine in Chrome & Firefox, just not Safari. As you indicated if you hold ctrl-c long enough it will eventually copy, just forces you to listen to the series of annoying bongs.
    Also there's no copy to clipboard in the context menu as illustrated below:
    http://i.imgur.com/adyyJO4.png
    Pretty annoying really, I'm not about to download a dozen attached PDFs to copy to clipboard, so now I'm sitting in the Delta lounge with my laptop bonging away as I wait for Safari to copy to clipboard and everyone looks at me like I'm a moron.
    NOTE: No I do not have acrobat or any other software loaded besides vanilla Safari. This has gone on on my MBP, Mac Pro and now this brand new MBP I got Monday as a company upgrade, it literally has nothing installed on it at the moment.

  • How can i copy text from web link title in safari

    Hi. How can i copy text to clipboard from web link title in safari in ios 7? Thank you
    Like this:
    http://photouploads.com/images/01wkw.jpg

    Once you have selected text, there will be blue circular buttons on the corners. Get the ones on the end and move them in towards the text that you want to copy. The problem that you seem to be facing where you are is that this text is a hyperlink. Because of that reason, you will have a difficult time tapping on the text without activating the link. I'm not sure you will be able to do that.

  • How can i copy text from a pdf while in firefox?

    i no longer seem to be able to highlight and copy text from a pdf, while in firefox 33.0, using adobe to view pdfs.
    how do i turn on the select tool, so i can do this?

    When viewing a PDF with a browser you are using a browse add-on (Adobe's, Firefox's, or some other provider).
    An add-on is not the desktop application; add-ons do not provide the full functionality of the desktop application (Reader or Acrobat).
    To have full use of all Comment and Drawing Markup tools save the PDF to the local machine's HDD.
    Launch Adobe Reader XI (pre-XI releases do not have the full set of these tools).
    Open the PDF. Annotate as desired.
    Be well...

  • Copy text from PDF and paste to imessage

    Before iOS7 I would be able to copy text from a PDF file and paste it normally into a text message or imessage.  Now when doing the same thing it doesn't paste the actual text I copied, but it pastes as an html attachment.  Have I changed a setting or is this just a bug that needs to be fixed?  Please help.

    I get the PDF in an email and open to view it.  Not sure what the pdf opens in automatically, but that is the way I've been doing it since I've had the iphone 4 and haven't had issues until ios7. 
    I just now tried to opened a file in the default view and then switched it to open in Adobe reader and I can copy and paste normally.  So now i have to do an extra step all the time?

  • How can i copy text from a website without getting blue formatting?

    I can't seem to get rid of the blue background when I copy text from a website and paste it into a Word doc.
    Any suggestions?

    Use an intermediate application to "strip" the copy elements of their extraneous/unwanted data. Paste the original copy into a text-only application like TextEdit, then copy the text itself from that paste. Then, paste the text into your Word document.

  • How can i copy files from my ipod to the i tunes?

    i just reformatted my laptop, then i installed a new itune. my problem is how can i copy all my files from ipod to the new itune. I cant sync it with the new itune or else it will be erase all my files in the ipod..what can i do ? can you pls. help me.....

    Connect your iPod to your computer. If it is set to update automatically you'll get a message that it is linked to a different library and asking if you want to link to this one and replace all your songs etc, press "Cancel". Pressing "Erase and Sync" will irretrievably remove all the songs from your iPod. Your iPod should appear in the iTunes source list from where you can change the update setting to manual and use your iPod without the risk of accidentally erasing it. Also when using most of the utilities listed below your iPod needs to be enabled for disc use, changing to manual update will do this by default. Check the "manually manage music and videos" box in Summary then press the Apply button: Managing content manually on iPod
    Once you are safely connected there are a few things you can do to restore your iTunes from the iPod. If you have any iTMS purchases the transfer of purchased content from the iPod to authorised computers was introduced with iTunes 7. A paragraph on it has been added to this article: Transfer iTunes Store purchases using iPod
    The transfer of non iTMS content such as songs imported from CD is designed by default to be one way from iTunes to iPod. However there is a manual method of accessing the iPod's hard drive and copying songs back to iTunes on Windows. The procedure is a bit involved and was written long before iTunes 7 so it requires a little adaptation, also it won't recover playlists but if you're interested it's posted in this thread: MacMuse - iPod to iTunes
    If you prefer something more automated then there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. This is just a selection, you'll find that they have varying degrees of functionality and some will transfer movies, videos, photos and games as well. Have a look at the web pages and documentation, they are generally quite straightforward. You can also read reviews of some of them here: Wired News - Rescue Your Stranded Tunes
    YamiPod Mac and Windows Versions
    iGadget Windows Only
    iPod Access Mac and Windows Versions
    Music Rescue Mac & Windows
    iPodCopy Mac and Windows Versions
    TuneJack Windows Only
    Whichever of these retrieval methods you choose, keep your iPod in manual mode until you have reloaded your iTunes and you are happy with your playlists etc then it will be safe to return it auto-sync. I would also advise that you get yourself an external hard drive and back your stuff up in case you have problems again. Relying on an iPod as your sole backup is not a good idea and external drives are comparatively inexpensive these days you can get loads of storage for a reasonable outlay.

  • How can I copy text from a PDF document in bb pbk?

    I've tried to copy a text from a PDF document but adobe reader doesn't give me that option. How can I do it? or there is a better reader for PDF that allows to copy, make bookmarks, to highlights?

    If the PDF is not an IMAGE, you can using a free program called PDF-XChange Viewer from Tracker Software. If the PDF was done as an image then you will not be able to select the text.
    Bold 9000 on Rogers Network - Company BES
    Playbook 16G WiFi Only

  • Copying text from PDF and no spaces

    I  get a pdf of Investors Business Daily from thier site.  It is copy protected but I use PDFKey to unlock it, so I can copy text.  When I copy text and paste it elsewhere often there are no spaces between words, I at first thought it had to do with the justification they used.   However if I use Preview the spaces are there!   So why the difference?  I use acrobat pro vs. preview for other reasons.  Is there some setting in preferences?
    Second question.  On this site, upper right is a box and magnifing glass.  If I use that to search the forums I get results for ALL forums.  Anyway to limit the search to just the forum your in?

    Steve,
    I think you missunderstand.  Since IBD posts most of the articles on their webpage, and that is not copy protected I could just do that.  Also since I am not republishing the articles but merrily re-organizing them for my own use, this does NOT break copyright law (check laws about copying any copyrighted material for you own personel use).
    You must own a copy of the material being reproduced.          check, I am a subscriber
    Purpose of copying - for your own private use.                       check
    Copies cannot be lent or shared with anyone.                         check
    The work being copied must be a legal (i.e. non-pirate) copy.   check
    Beyond this there are also fair use and research and study laws, that, if they applied for my use, would still permmit copying the material.
    That aside, I am NOT asking for help in using PDF cracking software.  Infact, Preview copies the material from the original file just fine.
    All that PDFKey does is flip one bit in the file, it does not change spaces or spacing between words, throughout the file.
    I am just asking how can it be that copying the same material from one source file, using two different PDF reading apps, give different results.

  • Can not copy text from pdf with unicode font embedded.

    Hello,
    I have a pdf with unicode font embedded in it. The pdf has no restrictions. When i try to copy some text text fro m pdf and then paste itin word, the text is not the same which i copied from the pdf. it changes.
    I have tried multiple softwares which converts pdf to word or pdf to excel. but none can do my job. what should be the problem? Kindly guide me.
    Thanks & Regards-
    rashmi

    Thanks for your prompt reply.
    As i said i have the font installed on my system. for your reference,
    following is the link to the pdf file. also the second link is the link to
    the fonts used. Kindly help me to sort this issue.
    https://www.yousendit.com/download/T2dkcHBEVEh0QTIwYjhUQw
    https://www.yousendit.com/download/T2dkcHBFQXBrYUJYd3NUQw

Maybe you are looking for

  • I cannot fill in fillable forms.

    When I click on the field, I get an error message that says window cannot acces path and I might noto have permissions. This has never happened before and I am really stuck. Anyone have any ideas?

  • APP - Vendor Exception

    hi all, i would like to know how to configure APP so that the company can make automatic payment to all vendor but not certain vendors based on the vendor number. I am at the learning stage so if there are scenario could you please bring it up with a

  • Spfile restore from RMAN Tape backup to different server

    Hi All, First of all let me thank you to the forum from which I keep updating my knowledge on oracle. I am having issues when trying to restore spfile from controlfile autobackup to different server. Problem and other details are below: Target versio

  • Status Icon in Dialog Programming

    hi all, Can any one tell me how to use status icons in dialogprogram?? never used it before. thanks

  • Approval Problem

    Hi experts, Yesterday I have simulated a scenario in which PR is created with Account assigned category K. In this PR Requisitioner is MIKET, his dollar limit is 1000 USD and PR amount is 1,00,000 USD. AS PR amount is more than Requisitioner limit 1s