daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. how to use Options in PDF module in play framework
  2. public class Design extends Controller {
  3. public static void renderPDFGen()
  4.     {
  5.     Options options = new Options();
  6.     options.HEADER_TEMPLATE = "/design/renderPDFHeader";
  7.     options.filename = "Invoice";
  8. renderPdf(options);
  9.     }
  10.  
  11.     public static void renderPDFHeader()
  12.         {
  13.             render();
  14.         }
  15. }
  16.    
  17. public static void renderPDFHeader()
  18.  {
  19.     //calculate the contents for the pdf
  20.     String var1, var2;
  21.  
  22.     //create Options helper
  23.     PDF.Options options = new PDF.Options();
  24.     options.filename="myfile.pdf";
  25.     //etc...
  26.  
  27.     //render
  28.     renderPdf(options, var1, var2); //note it's renderPDF, not render
  29.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top