public static PDFFileType GetPDFFileType(
string fileName,
bool pdfTypesOnly
)
Public Shared Function GetPDFFileType( _
ByVal fileName As String, _
ByVal pdfTypesOnly As Boolean _
) As PDFFileType
public static PDFFileType getPDFFileType(
java.lang.String fileName,
boolean pdfTypesOnly
);
public:
static PDFFileType GetPDFFileType(
String^ fileName,
bool pdfTypesOnly
)
fileName
The name of the PDF or Postscript file.
pdfTypesOnly
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.
An PDFFileType enumeration member that specifies the type of the file. If the file is not PDF (or Postscript depending on pdfTypesOnly), then PDFFileType.Unknown is returned.
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.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document