StitchPagesSideBySide

页面操作

描述

将两个现有页面并排放置在一个新的、更宽的页面上;两个源页面都被捕获为矢量 Form XObjects,并在左右两侧绘制,按要求的 TargetHeight 进行缩放,同时保留各自的宽高比;在它们之间会插入一个 Gap

新页面被追加到文档中;两个源页面都被捕获并隐藏;新页面的宽度被自动计算为 Page1ScaledWidth + Gap + Page2ScaledWidth

语法

Delphi

Function TPDFlib.StitchPagesSideBySide(Page1, Page2: Integer; Gap, TargetHeight: Double): Integer;

参数

Page1从 1 开始的页码 placed on the left (consumed and hidden)
Page2从 1 开始的页码 placed on the right (consumed and hidden); must differ from Page1
Gap新纸张上两页之间的水平间距,单位为当前测量单位
TargetHeight新输出页面的高度,每个源页面缩放(保持宽高比)到此高度

返回值

0无法执行缝合(页面无效、同一页面被指定了两次或 TargetHeight 为非正数)
>= 1从 1 开始的页码 of the newly created side-by-side page