3 Replies Latest reply on Jul 28, 2008 9:26 AM by edgriffiths

    cfdocument dynamic margin?

      Hi there.

      I am trying to write an Invoice PDF generator in CF8 whereby it gets some data from the DB and converts it to a PDF document. I am using XHTML and CSS to layout the data and then using cfdocument to generate the PDF.

      My problem is with the cfdocument margin functionality. For our invoices, the first page will always have an Invoice Header with a lot of detail and subsequent pages for that invoice will have shorter page headers will less detail so the margin needs to change as required.

      I have tried many different ways but there doesn’t seem to be any way of making those margin parameters dynamic! They need to be set as an absolute value in the cfdocumentsection (or cfdocument) tag otherwise it defaults to the 0.5in height and everything shrinks down.

      I would be most grateful if someone could advise me on a way to get around this issue.