andy
andy

Reputation:

how can i make a HTML submit button which hand you/generate a PDF?

Example provided would be helpful.

Upvotes: 2

Views: 310

Answers (2)

David Fox
David Fox

Reputation: 10753

use iText. its a great library. you have to hack a lot together if your pdf grows, but overall very handy

http://itextpdf.com/

basic document creation:

Document document = new Document();
try {
    PdfWriter.getInstance(document,
    new FileOutputStream("HelloWorld.pdf"));
    document.open();
    document.add(
    new Paragraph("Hello World"));
    } catch (Exception e) {
        // handle exception
    }
}
document.close();

Upvotes: 2

Josh K
Josh K

Reputation: 28883

While this will probably get migrated, your best bet would be implementing something like Zend_Pdf.

Upvotes: 1

Related Questions