RTF generation by a scheduled task

2010-09-23 Thread Thomas Harper

We're trying with CF9 on Windows Server 2008 to generate RTF files with font 
information. So far, the approaches we've seen depend on going through a 
browser to a user's desktop. What we need it to do is be able to generate the 
RTF file via a scheduled task that will be run every 5 minutes or so onto the 
server so that it gets put into a print queue.

We've tried writing a straight text file with RTF font code but as it gets sent 
to the print queue the code just comes across as plain text. Is there a way to 
do make an RTF file without the browser? Thank you. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337415
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RTF generation by a scheduled task

2010-09-23 Thread denstar

RTF files are plain text, so you can create them pretty easily.

If your attempts haven't worked so far, you're doing something wrong.  :)

Back in the day, I would create an RTF template, and go from there.
Try creating an RTF that looks like how you want it, and put
placeholders in the spots you want to insert dynamic content.

Nowadays, I just use JasperReports, and export in RTF using
cfjasperreport (a tag I wrote for generating jasperreport reports from
CF).

JasperReports is WICKED COOL for doing reports.  Beats the pants off
of ReportBuilder, etc..  Cross platform y todo.

:Den

-- 
A casual stroll through the lunatic asylum shows that faith does not
prove anything.
Friedrich Nietzsche

On Thu, Sep 23, 2010 at 12:52 PM, Thomas Harper wrote:

 We're trying with CF9 on Windows Server 2008 to generate RTF files with font 
 information. So far, the approaches we've seen depend on going through a 
 browser to a user's desktop. What we need it to do is be able to generate the 
 RTF file via a scheduled task that will be run every 5 minutes or so onto the 
 server so that it gets put into a print queue.

 We've tried writing a straight text file with RTF font code but as it gets 
 sent to the print queue the code just comes across as plain text. Is there a 
 way to do make an RTF file without the browser? Thank you.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337419
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RTF generation by a scheduled task

2010-09-23 Thread Rick Root

I recently had to write a script to generate RTF documents from data
in a database.

Creating the template was an interesting experience because the RTF
format seems to do all kinds of wacky stuff if you erase stuff, cut,
paste, etc.  Two things I found.  Making your RTF template with MS
Word, not with Wordpad, and #2 - don't make any mistakes creating your
template.  Don't erase anything.  Just type.  What i ended up doing
was making my rtf template by opening a document and typing in stuff
like VARIABLE001 VARIABLE002 VARIABLE003, and then just doind a
find/replace on the document to replace the placeholders with my data.

I had initiall tried pasting in VARIABLEXXX then going through and
changing the XXX to the numbers, only to find that for some reason
when I was done, VARIABLE001 didn't appear in the RTF source as I
would expect.

Rick

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337448
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RTF generation by a scheduled task

2010-09-23 Thread Gerald Guido

+1  (or -1 however you look at it.)
RTF is a total PITA when making edits. Tedious is an understatement.

Rick is right, do it right the first time. It will save you many, many
headaches.

G!

On Thu, Sep 23, 2010 at 9:45 PM, Rick Root rick.r...@gmail.com wrote:


 I recently had to write a script to generate RTF documents from data
 in a database.

 Creating the template was an interesting experience because the RTF
 format seems to do all kinds of wacky stuff if you erase stuff, cut,
 paste, etc.  Two things I found.  Making your RTF template with MS
 Word, not with Wordpad, and #2 - don't make any mistakes creating your
 template.  Don't erase anything.  Just type.  What i ended up doing
 was making my rtf template by opening a document and typing in stuff
 like VARIABLE001 VARIABLE002 VARIABLE003, and then just doind a
 find/replace on the document to replace the placeholders with my data.

 I had initiall tried pasting in VARIABLEXXX then going through and
 changing the XXX to the numbers, only to find that for some reason
 when I was done, VARIABLE001 didn't appear in the RTF source as I
 would expect.

 Rick

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337449
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm