addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

The Online ColdFusion Meetup Message Board › Generate a Word Doc in ColdFusion with Precicely Positioned Elements

Generate a Word Doc in ColdFusion with Precicely Positioned Elements

Roman S.
user 4696693
West Palm Beach, FL
Post #: 6
Hi All,

I just wasted two days trying to find a solution on how to do this, and after two somewhat different approaches I've failed both times.

I need to come up with a way to generate a word doc (or in reality any way that can be printed), to fill in the below pictured score cards with Player Name, Ttime, Start Hole, Yardage and Par values for each player for an event. The score cards, are pre-prented stock as shown below. I have all the data available.

I have tried to create a Word Template first using text areas for each cell and location, then using tables. I got it to work perfectly in Word, but when I save it as HTML, when I go to open it back up, all the positioning is completely messed up, it's not even close. I've used this method before to create mailing labels and other word documents, but for some reason it's not working for this.

Any suggestions for how to do it? How can you create a report/label that has elements precicely position on a printed page?

Charlie A.
Group Organizer
Jamestown, KY
Post #: 204
Roman, it would be important for you to indicate what version of CF you're using (since different versions have different support for direct integration with Word). Also, if you are using something other than CF's native approach, that would be vital to indicate. Finally, if you have tried others, that would be useful to note as well. That way others with experience with this problem can better help you.

I will report that I have a list of several other approaches for doing Excel integration, and some of them would apply as well to doing Word integration, at­.

I can't vouch for whether any of them would do better what you want, and I haven't done any Word integration at all so can't offer any more than the above toward your specific problem.

Hope you find a solution. If not, note that this forum is pretty lightly trafficed. Youd' be better off asking on the Adobe CF forums: http://forums.adobe.c...­
Roman S.
user 4696693
West Palm Beach, FL
Post #: 7

I'm using native CF9. I've actually gotten an answer from Adobe CF Product Manager that this should be added to CF10. For the time being, I'm sort of cheating. I've used LiveCycle Designer, to create a form with read-only fields, positioned precisely over a background and then deleted the background. Then I used cfpdfform to populate all the data elements, create a different PDF doc for every person and them merge them for printing. This will work, but far from the most elegant solution, and the final result is a PDF not Word, so the user can't make edits...

Hopefully this will be a whole lot easier in CF10.
Roman S.
user 4696693
West Palm Beach, FL
Post #: 8
Actually I've hit another road block. When I try to do
<cfpdf action="merge" destination="scoreCardsPrint\scoreC­ardsPrint_#URL.eventid#_#URL.round#.pdf"­ directory="#tempDirectory#" order="name" overwrite="yes">

The pages in the resulting merged PDF are all identical to the first page, but it has the correct number of pages.

I've tried to merge just two random PDFs and it worked fine, but when I try to merge two PDFs that were created from CFPDFFORM the first page keeps getting repeated over and over.
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy