3

I am in the process of taking some CPS formatted data from the database, placing the information in arrays, and then simply displaying it in a pdf document. This is not a problem, there are page breaks and so forth the issue is the following when generating the PDF document.

Orientation is done as you probably know by the following which applies to the ENTIRE document with the orientation attribute:

<cfdocument name="pdfFile" format="pdf" orientation="portrait" saveasname="DATA_PDF" pagetype="legal" fontembed="no" >

The issue is we have the information out in an array and some of the tables have many columns, some do not. We are able to produce these on different pages, but they are not fitting cause some are just too large in width (or they just end up not looking good with the auto formatting).

My question is, is there a way to have certain pages in your pdf document with different orientations? Sort of like you can in Word where you apply the orientation just to one page or a section. Everything I am seeing is that the cfdocument orientation attribute applies to the entire PDF, but is there another way around this?

I've seen this question asked around in other places on the web, but nobody has an answer. Any information would be appreciated.

Thanks

EXL
  • 77
  • 7
  • 2
    You should take a look at Itext. It is very fast and has a lot more capabilities then cfpdf. I am pretty sure your question is doable in Itext (see http://itextpdf.com/sandbox/events/PageRotation for the Java solution). Itext is built in Coldfusion (see http://stackoverflow.com/questions/4646735/what-version-of-itext-does-coldfusion-9-use). – Nebu Jul 08 '14 at 14:56
  • 4
    Create multiple PDFs and merge them together with `cfpdf`. – Sean Coyne Jul 08 '14 at 15:21
  • cfpdf merge was the way to go I found out. – EXL Jul 18 '14 at 20:53

0 Answers0