Package com.lowagie.text

Examples of com.lowagie.text.LwgDocument.top()


            // calculate diamond shaped hole
            float diamondHeight = 400;
            float diamondWidth = 400;
            float gutter = 10;
            float bodyHeight = document.top() - document.bottom();
            float colMaxWidth = (document.right() - document.left() - (gutter * 2)) / 2f;
            float diamondTop = document.top() - ((bodyHeight - diamondHeight) / 2f);
            float diamondInset = colMaxWidth - (diamondWidth / 2f);
            float centerX = (document.right() - document.left()) / 2 + document.left();
            // draw stuff
View Full Code Here


            float diamondHeight = 400;
            float diamondWidth = 400;
            float gutter = 10;
            float bodyHeight = document.top() - document.bottom();
            float colMaxWidth = (document.right() - document.left() - (gutter * 2)) / 2f;
            float diamondTop = document.top() - ((bodyHeight - diamondHeight) / 2f);
            float diamondInset = colMaxWidth - (diamondWidth / 2f);
            float centerX = (document.right() - document.left()) / 2 + document.left();
            // draw stuff
            PdfContentByte cb = writer.getDirectContentUnder();
           
View Full Code Here

            float diamondInset = colMaxWidth - (diamondWidth / 2f);
            float centerX = (document.right() - document.left()) / 2 + document.left();
            // draw stuff
            PdfContentByte cb = writer.getDirectContentUnder();
           
            MultiColumnText mct = new MultiColumnText(document.top() - document.bottom());

            // setup column 1
            float[] left = {document.left(), document.top(), document.left(), document.bottom()};
            float[] right = {document.left() + colMaxWidth, document.top(),
                             document.left() + colMaxWidth, diamondTop,
View Full Code Here

            PdfContentByte cb = writer.getDirectContentUnder();
           
            MultiColumnText mct = new MultiColumnText(document.top() - document.bottom());

            // setup column 1
            float[] left = {document.left(), document.top(), document.left(), document.bottom()};
            float[] right = {document.left() + colMaxWidth, document.top(),
                             document.left() + colMaxWidth, diamondTop,
                             document.left() + diamondInset, diamondTop - diamondHeight / 2,
                             document.left() + colMaxWidth, diamondTop - diamondHeight,
                             document.left() + colMaxWidth, document.bottom()
View Full Code Here

           
            MultiColumnText mct = new MultiColumnText(document.top() - document.bottom());

            // setup column 1
            float[] left = {document.left(), document.top(), document.left(), document.bottom()};
            float[] right = {document.left() + colMaxWidth, document.top(),
                             document.left() + colMaxWidth, diamondTop,
                             document.left() + diamondInset, diamondTop - diamondHeight / 2,
                             document.left() + colMaxWidth, diamondTop - diamondHeight,
                             document.left() + colMaxWidth, document.bottom()
                            };
View Full Code Here

                             document.left() + colMaxWidth, document.bottom()
                            };
            mct.addColumn(left, right);

            // setup column 2
            left = new float[] { document.right() - colMaxWidth, document.top(),
                                  document.right() - colMaxWidth, diamondTop,
                                  document.right() - diamondInset, diamondTop - diamondHeight / 2,
                                  document.right() - colMaxWidth, diamondTop - diamondHeight,
                                  document.right() - colMaxWidth, document.bottom()
                                 };
View Full Code Here

                                  document.right() - colMaxWidth, diamondTop,
                                  document.right() - diamondInset, diamondTop - diamondHeight / 2,
                                  document.right() - colMaxWidth, diamondTop - diamondHeight,
                                  document.right() - colMaxWidth, document.bottom()
                                 };
            right = new float[] { document.right(), document.top(), document.right(), document.bottom() };
            mct.addColumn(left, right);

            // add text
            for (int i=0; i<8; i++) {
                mct.addElement(new Paragraph("GALLIA est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur.  Hi omnes lingua, institutis, legibus inter se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et Sequana dividit. Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt.  Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt.\n", FontFactory.getFont(FontFactory.HELVETICA, 12)));
View Full Code Here

                mct.addElement(new Paragraph("Ea res est Helvetiis per indicium enuntiata.  Moribus suis Orgetoricem ex vinculis causam dicere coegerunt; damnatum poenam sequi oportebat, ut igni cremaretur.  Die constituta causae dictionis Orgetorix ad iudicium omnem suam familiam, ad hominum milia decem, undique coegit, et omnes clientes obaeratosque suos, quorum magnum numerum habebat, eodem conduxit; per eos ne causam diceret se eripuit.  Cum civitas ob eam rem incitata armis ius suum exequi conaretur multitudinemque hominum ex agris magistratus cogerent, Orgetorix mortuus est; neque abest suspicio, ut Helvetii arbitrantur, quin ipse sibi mortem consciverit.", FontFactory.getFont(FontFactory.HELVETICA, 12)));
            }
           do {
                cb.setLineWidth(5);
                cb.setColorStroke(Color.GRAY);
                cb.moveTo(centerX , document.top());
                cb.lineTo(centerX, document.bottom());
                cb.stroke();
                cb.moveTo(centerX, diamondTop);
                cb.lineTo(centerX - (diamondWidth/2), diamondTop - (diamondHeight / 2));
                cb.lineTo(centerX, diamondTop - diamondHeight);
View Full Code Here

            // step 4:
            // get the stream content
            PdfContentByte cb = writer.getDirectContent();
            // headers
            LwgPhrase fullTitle = new LwgPhrase("Full Title", font24B);
            float currentY = document.top();
            ColumnText ct = new ColumnText(cb);
            ct.setSimpleColumn(fullTitle, document.left(), 0, document.right(), document.top(), 24, LwgElement.ALIGN_JUSTIFIED);
            ct.go();
            currentY = ct.getYLine();
            currentY -= 4;
View Full Code Here

            PdfContentByte cb = writer.getDirectContent();
            // headers
            LwgPhrase fullTitle = new LwgPhrase("Full Title", font24B);
            float currentY = document.top();
            ColumnText ct = new ColumnText(cb);
            ct.setSimpleColumn(fullTitle, document.left(), 0, document.right(), document.top(), 24, LwgElement.ALIGN_JUSTIFIED);
            ct.go();
            currentY = ct.getYLine();
            currentY -= 4;
            cb.setLineWidth(1);
            cb.moveTo(document.left(), currentY);
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.