Java 类com.lowagie.text.pdf.PdfAcroForm 实例源码

项目:itext2    文件:FormSignatureTest.java   
/**
 * Generates an Acroform with a Signature
 */
@Test
public void main() throws Exception {

    // step 1: creation of a document-object
    Document document = new Document(PageSize.A4);

    // step 2:
    PdfWriter writer = PdfWriter.getInstance(document, PdfTestBase.getOutputStream("signature.pdf"));

    // step 3: we open the document
    document.open();

    // step 4:
    PdfAcroForm acroForm = writer.getAcroForm();
    document.add(new Paragraph("Hello World"));
    acroForm.addSignature("mysig", 73, 705, 149, 759);

    // step 5: we close the document
    document.close();
}
项目:PDFTestForAndroid    文件:FormSignature.java   
/**
 * Generates an Acroform with a Signature
 * 
 * @param args
 *            no arguments needed here
 */
public static void main(String[] args) {

    System.out.println("Signature");

    // step 1: creation of a document-object
    Document document = new Document(PageSize.A4);

    try {

        // step 2:
        PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(android.os.Environment.getExternalStorageDirectory() + java.io.File.separator + "droidtext" + java.io.File.separator + "signature.pdf"));

        // step 3: we open the document
        document.open();

        // step 4:
        PdfAcroForm acroForm = writer.getAcroForm();
        document.add(new Paragraph("Hello World"));
        acroForm.addSignature("mysig", 73, 705, 149, 759);

    } catch (DocumentException de) {
        System.err.println(de.getMessage());
    } catch (IOException ioe) {
        System.err.println(ioe.getMessage());
    }

    // step 5: we close the document
    document.close();
}
项目:itext2    文件:PdfAnnotationsImp.java   
public PdfAnnotationsImp(PdfWriter writer) {
    acroForm = new PdfAcroForm(writer);
}
项目:DroidText    文件:PdfAnnotationsImp.java   
public PdfAnnotationsImp(PdfWriter writer) {
    acroForm = new PdfAcroForm(writer);
}
项目:itext2    文件:PdfAnnotations.java   
/**
 * Use this methods to get the AcroForm object.
 * Use this method only if you know what you're doing
 * @return the PdfAcroform object of the PdfDocument
 */
public PdfAcroForm getAcroForm();
项目:itext2    文件:PdfAnnotationsImp.java   
/**
 * Gets the AcroForm object.
 * @return the PdfAcroform object of the PdfDocument
 */
public PdfAcroForm getAcroForm() {
    return acroForm;
}
项目:DroidText    文件:PdfAnnotations.java   
/**
 * Use this methods to get the AcroForm object.
 * Use this method only if you know what you're doing
 * @return the PdfAcroform object of the PdfDocument
 */
public PdfAcroForm getAcroForm();
项目:DroidText    文件:PdfAnnotationsImp.java   
/**
 * Gets the AcroForm object.
 * @return the PdfAcroform object of the PdfDocument
 */
public PdfAcroForm getAcroForm() {
    return acroForm;
}