公共无效InsertPagesFrom (
intinsertPageNumber,
PDFFile源文件,
intfirstPageNumber,
intlastPageNumber
)
vb (vb语法)
公共子InsertPagesFrom (_
按值传递_insertPageNumber_整数,_
按值传递_sourceFile_作为PDFFile,_
按值传递_firstPageNumber_整数,_
按值传递_lastPageNumber_整数_
)
公共无效insertPagesFrom (
intinsertPageNumber,
PDFFile源文件,
intfirstPageNumber,
intlastPageNumber
);
公共:
无效InsertPagesFrom (
intinsertPageNumber,
PDFFile ^源文件,
intfirstPageNumber,
intlastPageNumber
)
insertPageNumber
基于数量的插入点PDFFile对象。使用值0插入新页开始的文件和1在文件的末尾插入新页(附加)。
源文件
一个PDFFile对象与现有的PDF文件,包含源文件插入页面。
firstPageNumber
基于多源文件的第一页插入。必须是一个值大于或等于1。
lastPageNumber
基于多源文件的最后一页插入。必须是一个值大于或等于firstPageNumber和小于或等于该文件的总页数。使用的特殊价值1代表“文件最后一页”。
在这两个文件PDFFile(目的地)源文件必须存在,包含在调用这个方法之前有效的PDF文件。
使用这种方法,把这个PDFFile对象和源PDFFile使用有效的PDF文件和可选的密码。你可以通过使用来实现这一点PDFFile(字符串文件名)或PDFFile(文件名字符串,字符串密码)构造函数或一组文件名和可选的密码直接进入文件名和密码属性。你不需要打电话负载使用这种方法。
该方法将使用以下属性PDFFile对象:
DocumentProperties。如果此属性的值零,则将使用默认的属性
SecurityOptions。如果该属性的值零加密目标文件,那么将会使用这个属性的属性。如果此属性的值零,结果文件将不会被加密
CompatibilityLevel。的版本生成的PDF文件
这个例子将从现有的PDF文件中插入页面不同在不同的位置。
使用Leadtools.WinForms;
使用Leadtools;
使用Leadtools.Codecs;
使用Leadtools.Controls;
使用Leadtools.Drawing;
使用Leadtools.ImageProcessing;
使用Leadtools.Pdf;
使用Leadtools.Svg;
公共无效PDFFileInsertPagesFromExample ()
{
字符串originalFileName = Path.Combine (LEAD_VARS.ImagesDir,@“Leadtools.pdf”);
字符串sourceFileName = Path.Combine (LEAD_VARS.ImagesDir,@“PDFSegmentation.pdf”);
字符串destinationFileName1 = Path.Combine (LEAD_VARS.ImagesDir,@“InsertAtBeginning.pdf”);
字符串destinationFileName2 = Path.Combine (LEAD_VARS.ImagesDir,@“InsertInMiddle.pdf”);
字符串destinationFileName3 = Path.Combine (LEAD_VARS.ImagesDir,@“InsertAtEnd.pdf”);
/ /原始文件的一个副本
文件。复制(originalFileName destinationFileName1,真正的);
文件。SetAttributes (destinationFileName1 FileAttributes.Normal);
文件。复制(originalFileName destinationFileName2,真正的);
文件。SetAttributes (destinationFileName2 FileAttributes.Normal);
文件。复制(originalFileName destinationFileName3,真正的);
文件。SetAttributes (destinationFileName3 FileAttributes.Normal);
/ /这是源PDF文件插入到目的地
PDFFile源文件=新PDFFile (sourceFileName);
/ /插入sourceFileName2 destinationFileName1初
PDFFile文件=新PDFFile (destinationFileName1);
文件。InsertPagesFrom(0,源文件,1,1);
/ /插入sourceFileName2 destinationFileName2在中间
文件=新PDFFile (destinationFileName2);
file.InsertPagesFrom (file.GetPageCount() / 2,源文件,1,1);
/ /插入sourceFileName2 destinationFileName3结束时(附加)
文件=新PDFFile (destinationFileName3);
文件。InsertPagesFrom(1,源文件,1,1);
}
静态类LEAD_VARS
{
公共常量字符串ImagesDir =@“C: \ LEADTOOLS22 \ Resources \图片”;
}
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗Web查看器net
188宝金博怎么下载
支持的平台上
net, Java, Android和iOS / macOS组件
C / c++类库的API
HTML5 JavaScript库
你的邮件已经发送到支持!有人应该联系!如果你的问题是紧急请回到聊天。
聊天时间:
周一——周五,上午6点等
谢谢你的反馈!
请填写表单重新开始一个新的聊天。
所有代理目前离线。
聊天时间:
周一-周五
早上8:30 - 6点
联系我们请填写这张表格,我们将通过电子邮件联系你。