文档构建
XEasyPdfDocument document = XEasyPdfHandler.Document.build();
Copy to clipboardErrorCopied
页面构建
XEasyPdfPage page = XEasyPdfHandler.Page.build();
Copy to clipboardErrorCopied
页眉构建
XEasyPdfHeader header = XEasyPdfHandler.Header.build(component);
Copy to clipboardErrorCopied
页脚构建
XEasyPdfFooter footer = XEasyPdfHandler.Footer.build(component);
Copy to clipboardErrorCopied
水印构建
XEasyPdfWatermark watermark = XEasyPdfHandler.Watermark.build(string);
Copy to clipboardErrorCopied
文本构建
XEasyPdfText text = XEasyPdfHandler.Text.build(string);
Copy to clipboardErrorCopied
图片构建
XEasyPdfImage image = XEasyPdfHandler.Image.build(file);
Copy to clipboardErrorCopied
表格构建
// 表格
XEasyPdfTable table = XEasyPdfHandler.Table.build();
// 表格行
XEasyPdfRow row = XEasyPdfHandler.Table.Row.build();
// 表格列(单元格)
XEasyPdfCell cell = XEasyPdfHandler.Table.Row.Cell.build(width, height);
// 添加单元格到表格行
row.addCell(cell);
// 添加表格行到表格
table.addRow(row);
Copy to clipboardErrorCopied
矩形构建
XEasyPdfRect rect = XEasyPdfHandler.Rect.build(width, height);
Copy to clipboardErrorCopied
圆形构建
XEasyPdfCircle circle = XEasyPdfHandler.Circle.build(radius);
Copy to clipboardErrorCopied
条形码构建(一维码/二维码)
XEasyPdfBarCode barCode = XEasyPdfHandler.BarCode.build(codeType, content);
Copy to clipboardErrorCopied
线条构建
XEasyPdfLine line = XEasyPdfHandler.Line.build(beginX, beginY, endX, endY);
Copy to clipboardErrorCopied
实线分割线构建
XEasyPdfSolidSplitLine line = XEasyPdfHandler.SplitLine.SolidLine.build();
Copy to clipboardErrorCopied
虚线分割线构建
XEasyPdfDottedSplitLine line = XEasyPdfHandler.SplitLine.DottedLine.build();
Copy to clipboardErrorCopied
水平布局组件构建
// 水平布局
XEasyPdfHorizontalLayout layout = XEasyPdfHandler.Layout.Horizontal.build();
// 布局组件
XEasyPdfLayoutComponent layoutComponent = XEasyPdfHandler.Layout.Component.build(width, height);
// 设置组件
layoutComponent.setComponent(component);
// 添加到水平布局
layout.addLayoutComponent(layoutComponent);
Copy to clipboardErrorCopied
垂直布局组件构建
// 垂直布局
XEasyPdfVerticalLayout layout = XEasyPdfHandler.Layout.Vertical.build();
// 布局组件
XEasyPdfLayoutComponent layoutComponent = XEasyPdfHandler.Layout.Component.build(width, height);
// 设置组件
layoutComponent.setComponent(component);
// 添加到垂直布局
layout.addLayoutComponent(layoutComponent);