• 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: Maybe OT: getting general information of a pdf file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maybe OT: getting general information of a pdf file


  • Subject: Re: Maybe OT: getting general information of a pdf file
  • From: Jay Petronis <email@hidden>
  • Date: Tue, 11 Oct 2005 18:07:34 -0600

is there maybe anybody out there knowing of how to get the general information (esp. page size (maybe even the different 'boxes'), count of pages) out of a pdf-file without opening it with preview or even Acrobat?

If Mac OS X 10.4 is available, Spotlight might help identify some general information:


/usr/bin/mdls "sample.pdf"

    kMDItemNumberOfPages = 1
    kMDItemPageHeight = 792
    kMDItemPageWidth = 612

You can also try to search through the PDF directly using the command line:

/usr/bin/grep -a "<</MediaBox" "sample.pdf"

resulting in a string something like "<</MediaBox[0.0 0.0 612.0 792.0]" that could be further parsed with text item delimiters.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Maybe OT: getting general information of a pdf file (From: demski <email@hidden>)

  • Prev by Date: Re: Maybe OT: getting general information of a pdf file
  • Next by Date: Re: Finder in processes false ?
  • Previous by thread: Maybe OT: getting general information of a pdf file
  • Next by thread: Re: Maybe OT: getting general information of a pdf file
  • Index(es):
    • Date
    • Thread