c#
VB
c++
Java
公共PDFContentTypeGetContentType (
intpageNumber
)
公共函数GetContentType (_
按值传递pageNumber作为整数_
)作为PDFContentType
公共PDFContentTypegetContentType (
intpageNumber
);
公共:
PDFContentTypeGetContentType (
intpageNumber
)
pageNumber
要检查的页码。
一个PDFContentType指示指定页面的内容类型。
使用CodecsPdfLoadOptions。DropImageOverText来控制在将PDF页面加载为栅格图像或SVG图像时是否删除覆盖图像。
使用Leadtools;
使用Leadtools.Codecs;
使用Leadtools.Controls;
使用Leadtools.Pdf;
使用Leadtools.Svg;
使用Leadtools.WinForms;
公共无效PDFDocumentGetContentTypeExample ()
{
字符串pdfFileName = Path.Combine(LEAD_VARS.ImagesDir,@“Leadtools.pdf”);
字符串txtFileName = Path.Combine(LEAD_VARS.ImagesDir,@“LEAD_pdfContent.txt”);
//将结果保存到文本文件中进行检查
使用(StreamWriter writer = File.CreateText(txtFileName))
使用(PDFDocument文档=新PDFDocument (pdfFileName))
foreach(PDFDocumentPage页面在document.Pages)
{
PDFContentType contentType = document.GetContentType(page.PageNumber);
作家。WriteLine ("Page {0}: {1}",页面。PageNumber contentType.ToString ());
}
}
静态类LEAD_VARS
{
公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;
}
进口Leadtools
进口Leadtools。编解码器
进口Leadtools。控制
进口Leadtools.Pdf
进口Leadtools.Svg
进口Leadtools。WinForms
公共子PDFDocumentGetContentTypeExample ()
昏暗的pdfFileName作为字符串= Path.Combine (LEAD_VARS.ImagesDir“Leadtools.pdf”)
昏暗的txtFileName作为字符串= Path.Combine (LEAD_VARS.ImagesDir“LEAD_pdfContent.txt”)
将结果保存到文本文件中以供检查
使用作家作为StreamWriter = File.CreateText(txtFileName)
使用文档作为PDFDocument =新PDFDocument (pdfFileName)
为每一个页面作为PDFDocumentPage在文档。页面
昏暗的contentType作为PDFContentType = document.GetContentType(page.PageNumber)
作家。WriteLine ("Page {0}: {1}",页面。PageNumber contentType.ToString ())
下一个页面
结束使用
结束使用
结束子
公共NotInheritable类LEAD_VARS
公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”
结束类
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗网页查看器net
188宝金博怎么下载
支持的平台上
.NET、Java、Android和iOS/macOS程序集
C API/ c++类库
HTML5 JavaScript库
您的邮件已经发送到支持!应该有人保持联系!如果你有急事,请回来再谈。
聊天时间:
周一至周五,上午8:30至下午6点
感谢您的反馈!
请重新填写表格以开始新的聊天。
所有代理当前都处于离线状态。
聊天时间:
星期一至星期五
上午8:30 -下午6点
要联系我们,请填写此表格,我们将通过电子邮件与您联系。