Checking whether a file is a genuine PDF file
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