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


Word Document Generation

2001-07-09 Thread Chris Alvarado

I have an application that needs to generate Word Documents and basically 
open them on the fly. Currently I am using CFCONTENT to do this, however I 
have run into a small problem. I need to be able to use a defined Word 
TEMPLATE.  The template contains a footer and whatnot that needs to be 
contained in the document. Is there a good reference somewhere for using 
CFCONTENT, or is there another way to do this?

thanks for the help,

-chris


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Word Document Generation

2001-07-09 Thread David Shadovitz

Chris,

I know of two ways to do this.

1. CFCONTENT and CFHEADER.
As per http://tech.irt.org/articles/js154/index.htm, you can create your MS 
Word template and put CFML placeholders in it, save it as an RTF file, edit the 
RTF file to get or accept data, and then serve that filled-in file to the user 
via CFHEADER and CFCONTENT.  The RTF code is ugly; Dave Watts has pointed out 
that WordPerfect-generated RTF is cleaner.

2. CFOBJECT.
If the server has MS Word installed, you can use code like that at CF Comet  
http://www.cfcomet.com/cfcomet/word/  to generate the doc on the server, and 
then let the users download it via a hyperlink.

-David


On Monday, July 09, 2001 7:11 AM, Chris Alvarado 
[SMTP:[EMAIL PROTECTED]] wrote:
 I have an application that needs to generate Word Documents and basically
 open them on the fly. Currently I am using CFCONTENT to do this, however I
 have run into a small problem. I need to be able to use a defined Word
 TEMPLATE.  The template contains a footer and whatnot that needs to be
 contained in the document. Is there a good reference somewhere for using
 CFCONTENT, or is there another way to do this?


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists