Leadtools.Pdf Namespace > PDFFile Class : GetPDFFileType Method |
public static PDFFileType GetPDFFileType( string fileName, bool pdfTypesOnly )
'Declaration Public Shared Function GetPDFFileType( _ ByVal fileName As String, _ ByVal pdfTypesOnly As Boolean _ ) As PDFFileType
'Usage Dim fileName As String Dim pdfTypesOnly As Boolean Dim value As PDFFileType value = PDFFile.GetPDFFileType(fileName, pdfTypesOnly)
public static PDFFileType GetPDFFileType( string fileName, bool pdfTypesOnly )
function Leadtools.Pdf.PDFFile.GetPDFFileType( fileName , pdfTypesOnly )
public: static PDFFileType GetPDFFileType( String^ fileName, bool pdfTypesOnly )
The Load method will internally call GetPDFFileType with pdfTypesOnly set to true before loading the file properties.
When loading PDF files, generally you will call GetPDFFileType first to determine if the file provided by the user is valid PDF. After that, it is recommended you call IsEncrypted to check if the file is encrypted and ask the user for a password before loading the file.
For an example, refer to PDFCompatibilityLevel.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2