• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: collectdata
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: collectdata


  • Subject: Re: collectdata
  • From: Jim Underwood <email@hidden>
  • Date: Mon, 06 Mar 2017 17:23:27 +0000
  • Thread-topic: collectdata

Yvan and Shane,

That's a great script for extracting text from a PDF file! 👍
Many thanks for sharing.

By any chance, is there an option to extract the Comment annotations text?

Best Regards,

Jim Underwood
aka JMichaelTX


From: <applescript-users-bounces+jmichael=email@hidden> on behalf of Yvan KOENIG <email@hidden>
Date: Mon, Mar 6, 2017 at 6:41 AM
To: "ASUL (AppleScript)" <email@hidden>
Subject: Re: collectdata

No need for a third party tool to extract text from a PDF. This script delivered by Shane STANLEY doe the job.

(* text from PDF *)

use AppleScript version "2.4"
use framework "Foundation"
use framework "Quartz"
use scripting additions
on getTextFromPDF:posixPath
set theURL to current application's |NSURL|'s fileURLWithPath:posixPath
set thePDF to current application's PDFDocument's alloc()'s initWithURL:theURL
return (thePDF's |string|()) as text
end getTextFromPDF:
its getTextFromPDF:(POSIX path of (choose file of type {"pdf"}))


Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) lundi 6 mars 2017 13:40:51
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >collectdata (From: Julien Battist <email@hidden>)
 >Re: collectdata (From: Shane Stanley <email@hidden>)
 >Re: collectdata (From: Thomas Fischer <email@hidden>)
 >Re: collectdata (From: Julien Battist <email@hidden>)
 >Re: collectdata (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Calling Perl from AppleScript
  • Next by Date: Re: AppleScript Versions per Iteration of OSX?
  • Previous by thread: Re: collectdata
  • Next by thread: Re: collectdata
  • Index(es):
    • Date
    • Thread