Title: RE: [iText-questions] multipage display on one page of PDF document

This is a totally different case. It all depends on what classes you use to do it, the kind of data, etc.
More detail is needed. You probably won't need templates and do all the work with ColumnText and PdfPTable.

(It's better to stay on the mailing list)

Best Regards.
Paulo Soares

    -----Original Message-----
    From:   Neil Taylor [SMTP:[EMAIL PROTECTED]
    Sent:   Monday, January 12, 2004 11:45
    To:     Paulo Soares
    Subject:        Re: [iText-questions] multipage display on one page of PDF document

    Dear Paulo, 

    thanks for your quick response. 

    The four pages will actually be generated from within my application, rather than come from another PDF file.  I would like to draw the first page into the top left, the second page into the top right, the third page into the bottom left and the fourth page into the bottom right. 

    Each section will contain some slightly different information (an address). 

    Does this mean that I would create the PDFWriter, call getDirectContent() and then create a template for the 1/4 of the page I am interested in?  So, would I require 4 templates if I wanted 4 pages printed on one page? How do PdfContentByte.clip() and PdfContentByte.newPath() relate to this? I don't understand from the Javadoc what they are actually operating on/doing.   

    Best Regards, 

    Neil 

    On Monday, January 12, 2004, at 11:17  am, Paulo Soares wrote:


      You have a bit of work ahead, not with the clipping and rotating the pages, but with the layout if the pages have different sizes. The methods you'll need are:

      PdfWriter.getImportedPage() - to get the page from other pdf
      PdfContentByte.addTemplate() - to place the page
      PdfReader.getPagesize() and PdfReader.getCropBox() - to know the page dimensions
      PdfContentByte.clip() and PdfContentByte.newPath() - for clipping

      Best Regards,
      Paulo Soares

      -----Original Message-----
      From:�� [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Neil Taylor

      Sent:�� Monday, January 12, 2004 0:23
      To:���� [EMAIL PROTECTED]
      Subject:������� [iText-questions] multipage display on one page of PDF document

      Hi,

      I am writing an application where there is a feature to print multiple
      pages onto each sheet in the PDF. Therefore if I had a document with 6
      pages, and chose to print 4 pages per sheet, then I would end up with a
      2 page PDF with four 'pages' arranged on the first sheet and two
      'pages' arranged on the second sheet.

      My current approach within the application is to determine how many
      'pages' will be printed on each PDF page. Then size the various pages
      and output them to the PDF page and move onto the next page.

      There is the possibility that an item on any of the reduced sized pages
      may overrun its set area, and thus print into other areas of the final
      PDF page. Is there a way to clip each area. I have seen references to a
      clip() method in PDFContentByte, but it isn't clear to me how this can
      be used. What defines a clip area?

      Is it possible to set a clip area for each 1/4 of the page, write some
      elements to the relevant 1/4 of a page and anything that is outside the
      clip area is not drawn in the document?

      Is there a better approach to doing this with iText?

      Thanks for any assistance,

      Neil



      -------------------------------------------------------
      This SF.net email is sponsored by: Perforce Software.
      Perforce is the Fast Software Configuration Management System offering
      advanced branching capabilities and atomic changes on 50+ platforms.
      Free Eval! http://www.perforce.com/perforce/loadprog.html
      _______________________________________________
      iText-questions mailing list
      [EMAIL PROTECTED]
      https://lists.sourceforge.net/lists/listinfo/itext-questions


Reply via email to