Package com.itextpdf.text.pdf

Examples of com.itextpdf.text.pdf.PdfContentByte.addTemplate()


                + document.leftMargin() - document.left() - len) / 2.0F + 20F,
            document.bottom() - 20, 0);

    // 6.写入页脚2的模板(就是页脚的Y页这俩字)添加到文档中,计算模板的和Y轴,X=(右边界-左边界 - 前半部分的len值)/2.0F +
    // len , y 轴和之前的保持一致,底边界-20
    cb.addTemplate(total, (document.rightMargin() + document.right()
        + document.leftMargin() - document.left()) / 2.0F + 20F,
        document.bottom() - 20); // 调节模版显示的位置

  }
View Full Code Here


            universe.paint(g2);
            Text.setUseGreekThreshold(true);
            g2.dispose();

            // add the template
            cb.addTemplate(tp,20,0);

            // clean up everything
            doc.close();
           } catch (DocumentException e) {
             e.printStackTrace();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.