Gets the type of a PDF or Postscript file.
Public Shared Function GetPDFFileType( _
ByVal fileName As String, _
ByVal pdfTypesOnly As Boolean _
) As PDFFileType
The name of the PDF or Postscript file.
true to recognize only PDF files (Postscript files will not be recognized), and PDFFileType.Unknown will be returned when fileName is a PS or EPS file. false to recognize both PDF and PS files.
Generally, when loading PDF files call GetPDFFileType first to determine whether the file provided by the user is a valid PDF. After that, it is best to call IsEncrypted to determine whether the file is encrypted and ask the user for a password before loading the file.
For an example, refer to PDFCompatibilityLevel.
Medical Web Viewer .NET