adding PDFBox wicket component

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

adding PDFBox wicket component

Fred
This post was updated on .
Hello,

Does anyone know how I add pdfbox to a wicket component?

//component
public class BPPdfGeneration extends Panel
{
    public BPPdfGeneration(String id) throws IOException, DocumentException, PrinterException
    {
        super(id);
        PDDocument pdDocument;
        pdDocument = PDDocument.load(PDFGen.generatePDF());
        pdDocument.print();

//I assume that the pdDocument.print(); should be added to the html somehow such as:
//     add(new ?("pdf", pdDocument.print());
   }
}

something like this link would help but it does not work: (the stream pdf)
https://cwiki.apache.org/WICKET/streaming-files.html

Help would be greatly appreciated
Loading...