Re: Word document generation (header, footer, page numbering)

2008-06-11 Thread Loathe
I've heard that a couple of times now, but I don't think I could get 
permission to run another server, and I somehow doubt the security 
people would be down with it.

denstar wrote:
 On Tue, Jun 10, 2008 at 6:26 AM, Loathe [EMAIL PROTECTED] wrote:
 There are several well known ways of generating word documents, xml,
 html with cfcontent/header, and I hear POI although I haven't used it.

 I have a need to be able to create a word document and do page
 numbering, and have access to the header and footer to add letterhead
 and document classification information.  I'm wondering if anyone can
 point me towards a solution that does this other than CF Report Builder?
 
 My stock answer is JasperReports.  iReport is the visual designer,
 and it's quite nice (destroys the Report Builder, IMO).
 
 It has it's own XML format for creating reports, which is swell for
 use with some kind of code generator.
 
 Building PDFs and word docs and whatnot can eat up a lot of CPU cycles
 on a loaded server, so I started using JasperServer on a separate box,
 and just talk to it through the webservice it provides.
 
 It exports reports in PDF, RTF, XLS, CSV, and jasperserver will do
 auto-email stuff, so every Tuesday you can automatically send someone
 a report, or whatever.
 
 We've had great experiences with this setup.  YMMV.
 -denny
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307222
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Word document generation (header, footer, page numbering)

2008-06-10 Thread Loathe
There are several well known ways of generating word documents, xml, 
html with cfcontent/header, and I hear POI although I haven't used it.

I have a need to be able to create a word document and do page 
numbering, and have access to the header and footer to add letterhead 
and document classification information.  I'm wondering if anyone can 
point me towards a solution that does this other than CF Report Builder?

I've tried using open office wordProcesingML, but it doesn't auto 
generate page numbers.

T

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307153
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Word document generation (header, footer, page numbering)

2008-06-10 Thread Paul Hastings
Loathe wrote:
 I have a need to be able to create a word document and do page 
 numbering, and have access to the header and footer to add letterhead 
 and document classification information.  I'm wondering if anyone can 
 point me towards a solution that does this other than CF Report Builder?

have a look at iText's rtfWriter2 class. iText powers cfdocument, etc on cf7  
above so it should just be there. if you need the latest  greatest version, 
use mark's javaLoader to load the iText jar for use w/cf.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307156
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Word document generation (header, footer, page numbering)

2008-06-10 Thread Loathe
Thanks a lot, I'll jump into it now.

Paul Hastings wrote:
 Loathe wrote:
 I have a need to be able to create a word document and do page 
 numbering, and have access to the header and footer to add letterhead 
 and document classification information.  I'm wondering if anyone can 
 point me towards a solution that does this other than CF Report Builder?
 
 have a look at iText's rtfWriter2 class. iText powers cfdocument, etc on cf7 
  
 above so it should just be there. if you need the latest  greatest 
 version, 
 use mark's javaLoader to load the iText jar for use w/cf.
 
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307158
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RtfWriter2 was (Re: Word document generation (header, footer, page numbering))

2008-06-10 Thread Loathe
Whats the correct path to the RtfWriter2 class?

I thought it would be  com.lowagie.text.RtfWriter2 but it can't find 
that, I have googled all over the place for it. I've created the 
document object now I need to pass that to RtfWriter2.getInstance() but 
can't seem to instantiate a RtfWriter2 object.

Any hep would be appreciated, I'm so damned close :)

Also, how do you find these out?  I assumed there would be some way 
through introspection but can't seem to figure out how to get the info, 
I'm dumping the objects I have but I just get the methods and 
properties, no info on children or super or anything.

Paul Hastings wrote:
 Loathe wrote:
 I have a need to be able to create a word document and do page 
 numbering, and have access to the header and footer to add letterhead 
 and document classification information.  I'm wondering if anyone can 
 point me towards a solution that does this other than CF Report Builder?
 
 have a look at iText's rtfWriter2 class. iText powers cfdocument, etc on cf7 
  
 above so it should just be there. if you need the latest  greatest 
 version, 
 use mark's javaLoader to load the iText jar for use w/cf.
 
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307168
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: RtfWriter2 was (Re: Word document generation (header, footer, page numbering))

2008-06-10 Thread Loathe
Disregard.

It's com.lowagie.text.rtf.RtfWriter2

Loathe wrote:
 Whats the correct path to the RtfWriter2 class?
 
 I thought it would be  com.lowagie.text.RtfWriter2 but it can't find 
 that, I have googled all over the place for it. I've created the 
 document object now I need to pass that to RtfWriter2.getInstance() but 
 can't seem to instantiate a RtfWriter2 object.
 
 Any hep would be appreciated, I'm so damned close :)
 
 Also, how do you find these out?  I assumed there would be some way 
 through introspection but can't seem to figure out how to get the info, 
 I'm dumping the objects I have but I just get the methods and 
 properties, no info on children or super or anything.
 
 Paul Hastings wrote:
 Loathe wrote:
 I have a need to be able to create a word document and do page 
 numbering, and have access to the header and footer to add letterhead 
 and document classification information.  I'm wondering if anyone can 
 point me towards a solution that does this other than CF Report Builder?
 have a look at iText's rtfWriter2 class. iText powers cfdocument, etc on cf7 
  
 above so it should just be there. if you need the latest  greatest 
 version, 
 use mark's javaLoader to load the iText jar for use w/cf.



 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307169
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: RtfWriter2 was (Re: Word document generation (header, footer, page numbering))

2008-06-10 Thread Loathe
Moving on:

I have:

cfset docPath = expandPath(./testDoc.rtf)
cfset myFile = 
CreateObject(java,java.io.FileOutputStream).Init(CreateObject(java,java.io.File).Init(docPath))
cfscript
paths = arrayNew(1);

/*
This points to the jar we want to load.
Could also load a directory of .class files
*/
paths[1] = expandPath(iText-2.1.2u.jar);
paths[2] = expandPath(iText-rtf-2.1.2u.jar);


//create the loader
loader = createObject(component, javaloader.JavaLoader).init(paths);

myDoc = loader.create(com.lowagie.text.Document).init();
myRTF = loader.create(com.lowagie.text.rtf.RtfWriter2);
// myRTF = myRTF.init(myDoc,myFile)
// thisRTF = myRTF.getInstance(myRTF, myFile);
/cfscript

cfdump var=myRTF

No I need to instantiate an object of type RtfWriter2 the constructor 
takes type Document and OutputStream.  I would have though my init() 
would work but CF says it can't find a constructor that takes these 
types, what am I doing wrong here?

Does anyone have a basic hello world example I could take a look at that 
uses these classes?  Once I can get to having the RtfWriter2 I'm pretty 
sure I can figure it our the rest of the methods seem pretty easy to use 
and the lowagie site has some good examples.

Loathe wrote:
 Disregard.
 
 It's com.lowagie.text.rtf.RtfWriter2
 
 Loathe wrote:
 Whats the correct path to the RtfWriter2 class?

 I thought it would be  com.lowagie.text.RtfWriter2 but it can't find 
 that, I have googled all over the place for it. I've created the 
 document object now I need to pass that to RtfWriter2.getInstance() but 
 can't seem to instantiate a RtfWriter2 object.

 Any hep would be appreciated, I'm so damned close :)

 Also, how do you find these out?  I assumed there would be some way 
 through introspection but can't seem to figure out how to get the info, 
 I'm dumping the objects I have but I just get the methods and 
 properties, no info on children or super or anything.

 Paul Hastings wrote:
 Loathe wrote:
 I have a need to be able to create a word document and do page 
 numbering, and have access to the header and footer to add letterhead 
 and document classification information.  I'm wondering if anyone can 
 point me towards a solution that does this other than CF Report Builder?
 have a look at iText's rtfWriter2 class. iText powers cfdocument, etc on 
 cf7  
 above so it should just be there. if you need the latest  greatest 
 version, 
 use mark's javaLoader to load the iText jar for use w/cf.




 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307173
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: RtfWriter2 was (Re: Word document generation (header, footer, page numbering))

2008-06-10 Thread Loathe
Once again disregard, I figured it out.

A hello world with RtfWriter2:

cfset docPath = expandPath(testDoc.rtf)
cfset myFile = 
CreateObject(java,java.io.FileOutputStream).Init(CreateObject(java,java.io.File).Init(docPath))
 
/
cfscript
paths = arrayNew(1);

/*
This points to the jar we want to load.
Could also load a directory of .class files
*/
paths[1] = expandPath(iText-2.1.2u.jar);
paths[2] = expandPath(iText-rtf-2.1.2u.jar);


//create the loader
loader = createObject(component, javaloader.JavaLoader).init(paths);

myDoc = loader.create(com.lowagie.text.Document).init();
myRTF = loader.create(com.lowagie.text.rtf.RtfWriter2);
thisRTF = myRTF.getInstance(myDoc, myFile);
myDoc.open();
myPara = loader.create(com.lowagie.text.Paragraph);
para = myPara.init(Hello World);
myDoc.add(para);
myDoc.close();

/cfscript

Loathe wrote:
 Moving on:
 
 I have:
 
 cfset docPath = expandPath(./testDoc.rtf)
 cfset myFile = 
 CreateObject(java,java.io.FileOutputStream).Init(CreateObject(java,java.io.File).Init(docPath))
 cfscript
   paths = arrayNew(1);
 
   /*
   This points to the jar we want to load.
   Could also load a directory of .class files
   */
   paths[1] = expandPath(iText-2.1.2u.jar);
   paths[2] = expandPath(iText-rtf-2.1.2u.jar);
 
 
   //create the loader
   loader = createObject(component, javaloader.JavaLoader).init(paths);
   
   myDoc = loader.create(com.lowagie.text.Document).init();
   myRTF = loader.create(com.lowagie.text.rtf.RtfWriter2);
   // myRTF = myRTF.init(myDoc,myFile)
   // thisRTF = myRTF.getInstance(myRTF, myFile);
 /cfscript
   
 cfdump var=myRTF
 
 No I need to instantiate an object of type RtfWriter2 the constructor 
 takes type Document and OutputStream.  I would have though my init() 
 would work but CF says it can't find a constructor that takes these 
 types, what am I doing wrong here?
 
 Does anyone have a basic hello world example I could take a look at that 
 uses these classes?  Once I can get to having the RtfWriter2 I'm pretty 
 sure I can figure it our the rest of the methods seem pretty easy to use 
 and the lowagie site has some good examples.
 
 Loathe wrote:
 Disregard.

 It's com.lowagie.text.rtf.RtfWriter2

 Loathe wrote:
 Whats the correct path to the RtfWriter2 class?

 I thought it would be  com.lowagie.text.RtfWriter2 but it can't find 
 that, I have googled all over the place for it. I've created the 
 document object now I need to pass that to RtfWriter2.getInstance() but 
 can't seem to instantiate a RtfWriter2 object.

 Any hep would be appreciated, I'm so damned close :)

 Also, how do you find these out?  I assumed there would be some way 
 through introspection but can't seem to figure out how to get the info, 
 I'm dumping the objects I have but I just get the methods and 
 properties, no info on children or super or anything.

 Paul Hastings wrote:
 Loathe wrote:
 I have a need to be able to create a word document and do page 
 numbering, and have access to the header and footer to add letterhead 
 and document classification information.  I'm wondering if anyone can 
 point me towards a solution that does this other than CF Report Builder?
 have a look at iText's rtfWriter2 class. iText powers cfdocument, etc on 
 cf7  
 above so it should just be there. if you need the latest  greatest 
 version, 
 use mark's javaLoader to load the iText jar for use w/cf.




 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307174
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Word document generation (header, footer, page numbering)

2008-06-10 Thread denstar
On Tue, Jun 10, 2008 at 6:26 AM, Loathe [EMAIL PROTECTED] wrote:
 There are several well known ways of generating word documents, xml,
 html with cfcontent/header, and I hear POI although I haven't used it.

 I have a need to be able to create a word document and do page
 numbering, and have access to the header and footer to add letterhead
 and document classification information.  I'm wondering if anyone can
 point me towards a solution that does this other than CF Report Builder?

My stock answer is JasperReports.  iReport is the visual designer,
and it's quite nice (destroys the Report Builder, IMO).

It has it's own XML format for creating reports, which is swell for
use with some kind of code generator.

Building PDFs and word docs and whatnot can eat up a lot of CPU cycles
on a loaded server, so I started using JasperServer on a separate box,
and just talk to it through the webservice it provides.

It exports reports in PDF, RTF, XLS, CSV, and jasperserver will do
auto-email stuff, so every Tuesday you can automatically send someone
a report, or whatever.

We've had great experiences with this setup.  YMMV.
-denny

-- 
Dave: We're in a warehouse, and you just hit a cow. I think we better back up.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307184
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4