• 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
Checking whether a file is a genuine PDF file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Checking whether a file is a genuine PDF file


  • Subject: Checking whether a file is a genuine PDF file
  • From: Squ Aire <email@hidden>
  • Date: Sun, 4 Oct 2009 12:07:36 +0000
  • Importance: Normal

I know that, in an open dialog for example, I can view all PDF files by just filtering using the "pdf" file extension. But that isn't good enough really, because a file can have the pdf extension without being a true PDF file.


How can I check whether a file is indeed a true PDF file (that can be, for example, opened in Preview)? Would I be able to filter true PDFs file in an open dialog, or would I just have to stick to filtering with only the pdf extension in open dialogs, and later ignore the non-valid PDF files?


Do you have sample code that checks whether a given file is a genuine PDF file?

_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Checking whether a file is a genuine PDF file
      • From: Graham Cox <email@hidden>
    • Re: Checking whether a file is a genuine PDF file
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: converting a NSView into an NSImage, when scaling via scaleUnitSquareToSize [SOLVED, kinda]
  • Next by Date: Clickable URLs in a UITextView
  • Previous by thread: Re: converting a NSView into an NSImage, when scaling via scaleUnitSquareToSize [SOLVED, kinda]
  • Next by thread: Re: Checking whether a file is a genuine PDF file
  • Index(es):
    • Date
    • Thread