Re: collectdata
Re: collectdata
- Subject: Re: collectdata
- From: Yvan KOENIG <email@hidden>
- Date: Mon, 06 Mar 2017 13:41:21 +0100
Le 6 mars 2017 à 13:23, Julien Battist < email@hidden> a écrit :
Hi Thomas and Shane, first of all thanks for you response.
Yes, agree extracting the data with a tool is a good approach.
eg. pdftotext - Portable Document Format (PDF) to text converter. (that's what I am using)
But it a bit of a blind output.
I see some options using illustrator but I would have liked to prevent that :)
Best regards, Julien
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