![]() |
Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.3.23
|
Leadtools.Pdf Assembly > 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 )
The Load method will internally call GetPDFFileType with pdfTypesOnly set to true before loading the file properties.
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.