MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Import syntax question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85471] Re: Import syntax question
  • From: David Reiss <dbreiss at gmail.com>
  • Date: Mon, 11 Feb 2008 06:17:02 -0500 (EST)
  • References: <fomk40$hv9$1@smc.vnet.net>

Of course you could do something like


Import["file.pdf", #]&/@ {"Author", "Title"}


though it does call Import twice....

--David
A WorkLife FrameWork
E x t e n d i n g MATHEMATICA's Reach...
http://scientificarts.com/worklife/


On Feb 10, 5:36=A0am, Mark Fisher <particlefil... at gmail.com> wrote:
> Hi all,
>
> I find Import wonderful but frustrating. For example, I can get
> individual items such as "Author" and "Title" in separate calls:
>
> Import["file.pdf", "Author"]
> Import["file.pdf", "Title"]
>
> but I can't get a list as in
>
> Import["file.pdf", {"Author", "Title"}]
>
> Instead I get an error message that say "Title" is not present (which
> seems misleading at best, since I already accessed it above). Is that
> syntax supposed to work or not? (Frankly, I'm having a hard time
> figuring out what the proper generic syntax is for Import, especially
> since there are so few examples in the documentation.)
>
> BTW, I found out I can use
>
> {"Author", "Title"} /. Import["file.pdf", "Rules"]
>
> Is that what I "should" be doing? (It seems like overkill since Import
> has to import a bunch more stuff that I don't want, at least in this
> example.)
>
> --Mark



  • Prev by Date: Re: more looping trouble
  • Next by Date: Re: Re: How should I start with mathematica?
  • Previous by thread: Re: Import syntax question
  • Next by thread: Re: Import syntax question