Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfWriter.addAnnotation()


      document.newPage();
      // page 2
      writer.addAnnotation(PdfAnnotation.createLink(writer, new LwgRectangle(200f, 700f, 300f, 800f), PdfAnnotation.HIGHLIGHT_TOGGLE, PdfAction.javaScript("app.alert('Hello');\r", writer)));
      writer.addAnnotation(PdfAnnotation.createLink(writer, new LwgRectangle(200f, 550f, 300f, 650f), PdfAnnotation.HIGHLIGHT_OUTLINE, "top"));
      writer.addAnnotation(PdfAnnotation.createLink(writer, new LwgRectangle(200f, 400f, 300f, 500f), PdfAnnotation.HIGHLIGHT_PUSH, 1, new PdfDestination(PdfDestination.FIT)));
      writer.addAnnotation(PdfAnnotation.createSquareCircle(writer, new LwgRectangle(200f, 250f, 300f, 350f), "This Comment annotation was made with 'createSquareCircle'", false));
      document.newPage();
      // page 3
      PdfContentByte pcb = new PdfContentByte(writer);
      pcb.setColorFill(new Color(0xFF, 0x00, 0x00));
      writer.addAnnotation(PdfAnnotation.createFreeText(writer, new LwgRectangle(200f, 700f, 300f, 800f), "This is some free text, blah blah blah", pcb));
View Full Code Here


      writer.addAnnotation(PdfAnnotation.createSquareCircle(writer, new LwgRectangle(200f, 250f, 300f, 350f), "This Comment annotation was made with 'createSquareCircle'", false));
      document.newPage();
      // page 3
      PdfContentByte pcb = new PdfContentByte(writer);
      pcb.setColorFill(new Color(0xFF, 0x00, 0x00));
      writer.addAnnotation(PdfAnnotation.createFreeText(writer, new LwgRectangle(200f, 700f, 300f, 800f), "This is some free text, blah blah blah", pcb));
      writer.addAnnotation(PdfAnnotation.createLine(writer, new LwgRectangle(200f, 550f, 300f, 650f), "this is a line", 200, 550, 300, 650));
      writer.addAnnotation(PdfAnnotation.createStamp(writer, new LwgRectangle(200f, 400f, 300f, 500f), "This is a stamp", "Stamp"));
      writer.addAnnotation(PdfAnnotation.createPopup(writer, new LwgRectangle(200f, 250f, 300f, 350f), "Hello, I'm a popup!", true));
      cb.rectangle(200, 700, 100, 100);
      cb.rectangle(200, 550, 100, 100);
View Full Code Here

      document.newPage();
      // page 3
      PdfContentByte pcb = new PdfContentByte(writer);
      pcb.setColorFill(new Color(0xFF, 0x00, 0x00));
      writer.addAnnotation(PdfAnnotation.createFreeText(writer, new LwgRectangle(200f, 700f, 300f, 800f), "This is some free text, blah blah blah", pcb));
      writer.addAnnotation(PdfAnnotation.createLine(writer, new LwgRectangle(200f, 550f, 300f, 650f), "this is a line", 200, 550, 300, 650));
      writer.addAnnotation(PdfAnnotation.createStamp(writer, new LwgRectangle(200f, 400f, 300f, 500f), "This is a stamp", "Stamp"));
      writer.addAnnotation(PdfAnnotation.createPopup(writer, new LwgRectangle(200f, 250f, 300f, 350f), "Hello, I'm a popup!", true));
      cb.rectangle(200, 700, 100, 100);
      cb.rectangle(200, 550, 100, 100);
      cb.rectangle(200, 250, 100, 100);
View Full Code Here

      // page 3
      PdfContentByte pcb = new PdfContentByte(writer);
      pcb.setColorFill(new Color(0xFF, 0x00, 0x00));
      writer.addAnnotation(PdfAnnotation.createFreeText(writer, new LwgRectangle(200f, 700f, 300f, 800f), "This is some free text, blah blah blah", pcb));
      writer.addAnnotation(PdfAnnotation.createLine(writer, new LwgRectangle(200f, 550f, 300f, 650f), "this is a line", 200, 550, 300, 650));
      writer.addAnnotation(PdfAnnotation.createStamp(writer, new LwgRectangle(200f, 400f, 300f, 500f), "This is a stamp", "Stamp"));
      writer.addAnnotation(PdfAnnotation.createPopup(writer, new LwgRectangle(200f, 250f, 300f, 350f), "Hello, I'm a popup!", true));
      cb.rectangle(200, 700, 100, 100);
      cb.rectangle(200, 550, 100, 100);
      cb.rectangle(200, 250, 100, 100);
      cb.stroke();
View Full Code Here

      PdfContentByte pcb = new PdfContentByte(writer);
      pcb.setColorFill(new Color(0xFF, 0x00, 0x00));
      writer.addAnnotation(PdfAnnotation.createFreeText(writer, new LwgRectangle(200f, 700f, 300f, 800f), "This is some free text, blah blah blah", pcb));
      writer.addAnnotation(PdfAnnotation.createLine(writer, new LwgRectangle(200f, 550f, 300f, 650f), "this is a line", 200, 550, 300, 650));
      writer.addAnnotation(PdfAnnotation.createStamp(writer, new LwgRectangle(200f, 400f, 300f, 500f), "This is a stamp", "Stamp"));
      writer.addAnnotation(PdfAnnotation.createPopup(writer, new LwgRectangle(200f, 250f, 300f, 350f), "Hello, I'm a popup!", true));
      cb.rectangle(200, 700, 100, 100);
      cb.rectangle(200, 550, 100, 100);
      cb.rectangle(200, 250, 100, 100);
      cb.stroke();
     
View Full Code Here

                Logger.getLogger(ITextRadio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (DocumentException ex) {
                Logger.getLogger(ITextRadio.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        writer.addAnnotation(radiogroup);
    }

    public static Rectangle getBoxRectangle(Rectangle rectangle, int i) {
        Rectangle rect = new Rectangle(160, rectangle.getTop(i * 20), 180, rectangle.getTop(20 + i * 20));
        return rect;
View Full Code Here

                field.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, "Off", onOff[0]);
                field.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, "Yes", onOff[1]);
                if (locked) {
                    field.setFieldFlags(BaseField.READ_ONLY);
                }
                writer.addAnnotation(field);
                ITextRadio.addBoxDescription(rectangle, i, values, canvases);
            } catch (IOException ex) {
                Logger.getLogger(ITextCheckbox.class.getName()).log(Level.SEVERE, null, ex);
            } catch (DocumentException ex) {
                Logger.getLogger(ITextCheckbox.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

        try {
            PdfFormField field = text.getTextField();
            if(locked) {
                field.setFieldFlags(BaseField.READ_ONLY);
            }
            writer.addAnnotation(field);
        } catch (IOException ioe) {
            throw new ExceptionConverter(ioe);
        } catch (DocumentException de) {
            throw new ExceptionConverter(de);
        }
View Full Code Here

        try {
            PdfFormField comboField = text.getComboField();
            if(locked) {
                comboField.setFieldFlags(BaseField.READ_ONLY);
            }
            writer.addAnnotation(comboField);
        } catch (IOException ex) {
            Logger.getLogger(ITextSelect.class.getName()).log(Level.SEVERE, null, ex);
        } catch (DocumentException ex) {
            Logger.getLogger(ITextSelect.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

        try {
            PdfFormField listField = text.getListField();
            if(locked) {
                listField.setFieldFlags(BaseField.READ_ONLY);
            }
            writer.addAnnotation(listField);
        } catch (IOException ex) {
            Logger.getLogger(ITextListbox.class.getName()).log(Level.SEVERE, null, ex);
        } catch (DocumentException ex) {
            Logger.getLogger(ITextListbox.class.getName()).log(Level.SEVERE, null, ex);
        }
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.