MathGroup Archive 2008

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

Search the Archive

Re: Import syntax question

  • To: mathgroup at
  • Subject: [mg85470] Re: Import syntax question
  • From: David Bailey <dave at>
  • Date: Mon, 11 Feb 2008 06:16:31 -0500 (EST)
  • References: <fomk40$hv9$>

Mark Fisher 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
I agree with your general comment. It seems to me that an enormous 
amount of development work has gone into both Import and Export at 
version 6, but the corresponding documentation is fragmentary and vague, 
with far too few examples. I sense that there are all sorts of 
possibilities hidden in these two functions that are unused because they 
are effectively undocumented.

David Bailey

  • Prev by Date: Re: Re: button to load files from a window
  • Next by Date: Re: Integrating x^b*Log ^m gives wrong result?
  • Previous by thread: Re: Import syntax question
  • Next by thread: Re: Import syntax question