Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how to use Options in PDF module in play framework
- public class Design extends Controller {
- public static void renderPDFGen()
- {
- Options options = new Options();
- options.HEADER_TEMPLATE = "/design/renderPDFHeader";
- options.filename = "Invoice";
- renderPdf(options);
- }
- public static void renderPDFHeader()
- {
- render();
- }
- }
- public static void renderPDFHeader()
- {
- //calculate the contents for the pdf
- String var1, var2;
- //create Options helper
- PDF.Options options = new PDF.Options();
- options.filename="myfile.pdf";
- //etc...
- //render
- renderPdf(options, var1, var2); //note it's renderPDF, not render
- }
Add Comment
Please, Sign In to add comment