Package com.itextpdf.text

Examples of com.itextpdf.text.Document.top()


        Document doc = new Document(PageSize.A4.rotate(), 0, 0, 0, 0);
        PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(output));
        doc.open();
        // splitLine(doc, writer);
        PdfContentByte cb = writer.getDirectContent();
        float bottom = (doc.top() - pageSize.getHeight()) / 2 + kOffset;
        float left = doc.right() / 2 - (pageSize.getWidth() + kTextWidth) / 2 - kMargin;
        float right = doc.right() / 2 - (pageSize.getWidth() - kTextWidth) / 2 + kMargin;

        for (int i = 0; i <= n;) {
            PdfImportedPage page = getPage(writer, reader, i++);
View Full Code Here


            pages[i++] = x++;
            pages[i++] = x++;
            pages[i++] = y--;
        }
        PdfContentByte cb = writer.getDirectContent();
        float bottom = (doc.top() - pageSize.getHeight()) / 2 + kOffset;
        float left = doc.right() / 2 - (pageSize.getWidth() + kTextWidth) / 2 - kMargin;
        float right = doc.right() / 2 - (pageSize.getWidth() - kTextWidth) / 2 + kMargin;

        for (int i = 0; i < pages.length;) {
            PdfImportedPage page = getPage(writer, reader, pages[i++]);
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.