public class PageSize extends Object
Copyright (c) 2020 xsx All Rights Reserved. x-easypdf-pdfbox is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.
Modifier and Type | Field and Description |
---|---|
static PageSize |
A0
************************************************** A类 ****************************************************
/**
A0
|
static PageSize |
A1
A1
|
static PageSize |
A2
A2
|
static PageSize |
A3
A3
|
static PageSize |
A4
A4
|
static PageSize |
A5
A5
|
static PageSize |
A6
A6
|
static PageSize |
A7
A7
|
static PageSize |
A8
A8
|
static PageSize |
B0
************************************************** B类 ****************************************************
/**
B0
|
static PageSize |
B1
B1
|
static PageSize |
B2
B2
|
static PageSize |
B3
B3
|
static PageSize |
B4
B4
|
static PageSize |
B5
B5
|
static PageSize |
B6
B6
|
static PageSize |
B7
B7
|
static PageSize |
B8
B8
|
Modifier and Type | Method and Description |
---|---|
static PageSize |
create(float width,
float height)
创建页面尺寸
|
static PageSize |
create(float leftX,
float rightX,
float bottomY,
float topY)
创建页面尺寸
|
float |
getBottomY()
获取Y轴下坐标
|
float |
getLeftX()
获取X轴左坐标
|
float |
getRightX()
获取X轴右坐标
|
float |
getTopY()
获取Y轴上坐标
|
static float |
getUnit()
获取每毫米像素点
|
PageSize |
scale(float scale)
缩放
|
PageSize |
toLandscape()
切换横向
|
Rectangle |
toRectangle()
转为矩形
|
public static final PageSize A0
841 * 1189,单位:mm
2383.937 * 3370.3938,单位:px
public static final PageSize A1
594 * 841,单位:mm
1683.7795 * 2383.937,单位:px
public static final PageSize A2
420 * 594,单位:mm
1190.5513 * 1683.7795,单位:px
public static final PageSize A3
297 * 420,单位:mm
841.8898 * 1190.5513,单位:px
public static final PageSize A4
210 * 297,单位:mm
595.27563 * 841.8898,单位:px
761 * 841.8898,单位:px
public static final PageSize A5
148 * 210,单位:mm
419.52756 * 595.27563,单位:px
public static final PageSize A6
105 * 148,单位:mm
297.63782 * 419.52756,单位:px
public static final PageSize A7
74 * 105,单位:mm
209.76378 * 297.63782,单位:px
public static final PageSize A8
52 * 74,单位:mm
147.40158 * 209.76378,单位:px
public static final PageSize B0
1030 * 1456,单位:mm
2919.685 * 4127.244,单位:px
public static final PageSize B1
728 * 1030,单位:mm
2063.622 * 2919.685,单位:px
public static final PageSize B2
515 * 728,单位:mm
1459.8425 * 2063.622,单位:px
public static final PageSize B3
364 * 515,单位:mm
1031.811 * 1459.8425,单位:px
public static final PageSize B4
257 * 364,单位:mm
728.50397 * 1031.811,单位:px
public static final PageSize B5
182 * 257,单位:mm
515.9055 * 728.50397,单位:px
public static final PageSize B6
128 * 182,单位:mm
362.83466 * 515.9055,单位:px
public static final PageSize B7
91 * 128,单位:mm
257.95276 * 362.83466,单位:px
public static final PageSize B8
64 * 91,单位:mm
181.41733 * 257.95276,单位:px
public static PageSize create(float width, float height)
width
- 宽度height
- 高度public static PageSize create(float leftX, float rightX, float bottomY, float topY)
leftX
- X轴左坐标rightX
- X轴右坐标bottomY
- Y轴下坐标topY
- Y轴上坐标public static float getUnit()
public PageSize toLandscape()
public PageSize scale(float scale)
scale
- 比例public float getLeftX()
public float getRightX()
public float getBottomY()
public float getTopY()
public Rectangle toRectangle()
Copyright © 2024. All rights reserved.