Gets the type of a PDF or Postscript file.
public static Leadtools.Pdf.PDFFileType GetPDFFileType(
string fileName,
bool pdfTypesOnly
)
Public Shared Function GetPDFFileType( _
ByVal fileName As String, _
ByVal pdfTypesOnly As Boolean _
) As Leadtools.Pdf.PDFFileType
public:
static Leadtools.Pdf.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.
Products |
Support |
Feedback: GetPDFFileType Method - Leadtools.Pdf |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.