PrintCoordinateOptions
PrintCoordinateOptions
Section titled “PrintCoordinateOptions”new PrintCoordinateOptions()
有关介质和关联打印参数的信息。
PrintCoordinateOptions.emulsion
Section titled “PrintCoordinateOptions.emulsion”printCoordinateOptions.emulsion
如果为 true
,则水平翻转图稿。
默认值:false
布尔值
PrintCoordinateOptions.fitToPage
Section titled “PrintCoordinateOptions.fitToPage”printCoordinateOptions.fitToPage
如果为 true
,则按比例缩放图稿以适应介质。
默认值:false
布尔值
PrintCoordinateOptions.horizontalScale
Section titled “PrintCoordinateOptions.horizontalScale”printCoordinateOptions.horizontalScale
水平缩放因子,以百分比表示(100 = 100%)。
范围:1.0 到 10000.0。
默认值:100.0
数字(双精度)
PrintCoordinateOptions.orientation
Section titled “PrintCoordinateOptions.orientation”printCoordinateOptions.orientation
图稿的方向。
默认值:PrintOrientation.PORTRAIT
PrintCoordinateOptions.position
Section titled “PrintCoordinateOptions.position”printCoordinateOptions.position
图稿在介质上的位置。
默认值:PrintPosition.TRANSLATECENTER
PrintCoordinateOptions.tiling
Section titled “PrintCoordinateOptions.tiling”printCoordinateOptions.tiling
页面平铺模式。
默认值:PrintTiling.TILESINGLEFULLPAGE
PrintCoordinateOptions.typename
Section titled “PrintCoordinateOptions.typename”printCoordinateOptions.typename
对象的类名。
字符串;只读。
PrintCoordinateOptions.verticalScale
Section titled “PrintCoordinateOptions.verticalScale”printCoordinateOptions.verticalScale
垂直缩放因子,以百分比表示(100 = 100%)。
范围:1.0 到 10000.0。
默认值:100.0
数字(双精度)
管理打印坐标
Section titled “管理打印坐标”// 创建一个新文档,其中包含超出页面的符号项,然后以每种打印方向打印var docRef = documents.add();var y = 500;var x = -70;
if (docRef.symbols.length > 0) {
for (var i = 0; i < 5; i++) { symbolRef = docRef.symbols[0];
symbolItemRef1 = docRef.symbolItems.add(symbolRef); symbolItemRef1.top = y; symbolItemRef1.left = x;
x += 30; }
redraw();
// 使用各种坐标选项打印 var coordinateOptions = new PrintCoordinateOptions(); var options = new PrintOptions(); options.coordinateOptions = coordinateOptions;
coordinateOptions.emulsion = true; // 从右到左反转 coordinateOptions.fitToPage = true; // 将图稿适应页面大小 coordinateOptions.orientation = PrintOrientation.LANDSCAPE; docRef.print(options);
coordinateOptions.emulsion = false; coordinateOptions.fitToPage = false; coordinateOptions.orientation = PrintOrientation.PORTRAIT; coordinateOptions.horizontalScale = 50; coordinateOptions.verticalScale = 50; docRef.print(options);}