Package com.lowagie.text

Examples of com.lowagie.text.Document.left()


      cb.setColorStroke(Color.RED);
       

      cb.moveTo(document.left(),  document.top()-150);
       
      cb.lineTo((document.right() - document.left())/2,  document.top() -150);
       
      cb.stroke();
     
   
View Full Code Here


       //中间边距
        float gutter = 20;
        int numColumns = 2;
       
       
        float fullWidth = document.right() - document.left();
        float columnWidth = (fullWidth - (numColumns - 1) * gutter) / numColumns;
       
        float allColumns[] = new float[numColumns]; // left
       
        for (int k = 0; k < numColumns; ++k) {
View Full Code Here

        float columnWidth = (fullWidth - (numColumns - 1) * gutter) / numColumns;
       
        float allColumns[] = new float[numColumns]; // left
       
        for (int k = 0; k < numColumns; ++k) {
            allColumns[k] = document.left() + (columnWidth + gutter) * k;
        }

    /////////////////为了处理Column
       
        ////////打开文档
View Full Code Here

            //中间边距
            float gutter = 20;
            int numColumns = 2;
           
           
            float fullWidth = document.right() - document.left();
            float columnWidth = (fullWidth - (numColumns - 1) * gutter) / numColumns;
           
            float allColumns[] = new float[numColumns]; // left
           
            for (int k = 0; k < numColumns; ++k) {
View Full Code Here

            float columnWidth = (fullWidth - (numColumns - 1) * gutter) / numColumns;
           
            float allColumns[] = new float[numColumns]; // left
           
            for (int k = 0; k < numColumns; ++k) {
                allColumns[k] = document.left() + (columnWidth + gutter) * k;
            }
            // set the fonts
            Font font24B = FontFactory.getFont(FontFactory.TIMES_ROMAN, 24, Font.BOLD);
            Font font10B = FontFactory.getFont(FontFactory.TIMES_ROMAN, 10, Font.BOLD);
            Font font14B = FontFactory.getFont(FontFactory.TIMES_ROMAN, 14, Font.BOLD, new Color(255, 0, 0));
View Full Code Here

//           
           
           
           
            Image img = Image.getInstance("c:\\lh.jpg");
            cb.addImage(img, img.getScaledWidth(), 0, 0, img.getScaledHeight(), document.left(), currentY - img.getScaledHeight());
            currentY -= img.getScaledHeight() + 10;
            ct.setYLine(currentY);
            ct.addText(new Chunk("Key Data:", font14B));
            ct.go();
            currentY = ct.getYLine();
View Full Code Here

            ptable.addCell(new Phrase("Ben Forta", font9));
            ptable.addCell(new Phrase("Pub Date:", font9));
            ptable.addCell(new Phrase("06/05/1998", font9));
            ptable.setTotalWidth(columnWidth);

            currentY = ptable.writeSelectedRows(0, -1, document.left(), currentY, cb) - 20;
            for (int k = 0; k < headings.length; ++k) {
                ct.addText(new Chunk(headings[k] + "\n", font14B));
                ct.addText(new Chunk(texts[k] + "\n\n", font11));
            }
View Full Code Here

            //中间边距
            float gutter = 20;
            //////列数
            int numColumns = 2;
            
            float fullWidth = document.right() - document.left();
            float columnWidth = (fullWidth - (numColumns - 1) * gutter) / numColumns;
           
            float allColumns[] = new float[numColumns]; // left
           
            for (int k = 0; k < numColumns; ++k) {
View Full Code Here

            float columnWidth = (fullWidth - (numColumns - 1) * gutter) / numColumns;
           
            float allColumns[] = new float[numColumns]; // left
           
            for (int k = 0; k < numColumns; ++k) {
                allColumns[k] = document.left() + (columnWidth + gutter) * k;
            }
            // set the fonts
            Font font24B = FontFactory.getFont(FontFactory.TIMES_ROMAN, 24, Font.BOLD, new Color(255, 0, 0));
            Font font10B = FontFactory.getFont(FontFactory.TIMES_ROMAN, 10, Font.BOLD);
            Font font14B = FontFactory.getFont(FontFactory.TIMES_ROMAN, 14, Font.BOLD, new Color(255, 0, 0));
View Full Code Here

//           
           
           
           
            Image img = Image.getInstance("c:\\lh.jpg");
            cb.addImage(img, img.getScaledWidth(), 0, 0, img.getScaledHeight(), document.left(), currentY - img.getScaledHeight());
            currentY -= img.getScaledHeight() + 10;
            ct.setYLine(currentY);
//            Chunk cc = new Chunk("DDD\n", font24B);
//            ct.addText(cc);
          Paragraph title1 = new Paragraph("Chapter 1", FontFactory.getFont(
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.