Announcement Announcement Module
Collapse
No announcement yet.
Composing PDF document Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Composing PDF document

    Is possible compose PDF document multipage where each page is a single view of king AbstractPDFView ?
    Im my applications I've numerous PDF views that work perfect.
    Now I would create one single PDF document (Pdf view) made with that single page.

    Sorry fo my bad English.
    Thank you !

  • #2
    Can you not refactor so that you reuse the code that creates the component parts of the documents, which might be separate or unified?

    Comment


    • #3
      Composing PDF document

      Thank you Rod for your reply.

      My temporary solution is :

      public class templatePDF extends AbstractPdfView {
      protected void buildPdfDocument(Map model,
      Document pdfDoc,
      PdfWriter writer,
      HttpServletRequest request,
      HttpServletResponse response)
      PDFPage1 pdf1 = new PDFPage1();
      PDFPage2 pdf2 = new PDFPage2();
      PDFPage3 pdf3 = new PDFPage3();
      pdf1.buildPdfDocument(model,pdfDoc,writer,request, response);
      pdf2.buildPdfDocument(model,pdfDoc,writer,request, response);
      pdf3.buildPdfDocument(model,pdfDoc,writer,request, response);
      }
      }

      This output one PDF multipage.
      Is this wrong ?

      Comment

      Working...
      X