[SerializableAttribute()]
public enum PDFContentType
public final class PDFContentType
extends java.lang.Enum<PDFContentType>
[SerializableAttribute()]
public enum class PDFContentType
class PDFContentType(Enum):
Text = 0
Image = 1
ImageOverText = 2
Value | Member | Description |
---|---|---|
0 | Text | PDF contains any content |
1 | Image | Page has an image only, no other content |
2 | ImageOverText | Page has an image over the content |
Used by PDFDocument.GetContentType to indicate the PDF content type.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Pdf;
using Leadtools.Svg;
using Leadtools.WinForms;
public void PDFDocumentGetContentTypeExample()
{
string pdfFileName = Path.Combine(LEAD_VARS.ImagesDir, @"Leadtools.pdf");
string txtFileName = Path.Combine(LEAD_VARS.ImagesDir, @"LEAD_pdfContent.txt");
// Save the results to the text file for examining
using (StreamWriter writer = File.CreateText(txtFileName))
using (PDFDocument document = new PDFDocument(pdfFileName))
foreach (PDFDocumentPage page in document.Pages)
{
PDFContentType contentType = document.GetContentType(page.PageNumber);
writer.WriteLine("Page {0}: {1}", page.PageNumber, contentType.ToString());
}
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
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