• 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: Julien Battist <email@hidden>
  • Date: Mon, 06 Mar 2017 14:30:05 +0100
  • Importance: normal
  • Sensitivity: Normal

Hi Yvan,
 
Thanks for sharing this, first test looks pretty clean, respecting layout of the document and French accents...
 
best regards,julien
 
Sent: Monday, March 06, 2017 at 1:41 PM
From: "Yvan KOENIG" <email@hidden>
To: "liste AppleScript US" <email@hidden>
Subject: Re: collectdata
 
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

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: Re: Conversion of ISO Date String to AppleScript Date
  • Next by Date: Re: AppleScript Versions per Iteration of OSX?
  • Previous by thread: Re: collectdata
  • Next by thread: Re: collectdata
  • Index(es):
    • Date
    • Thread