Printing from within ColdFushion

I have an executable program in Visual Basic that prints receipts to a printer, and it works. My problem is that when I turn it into a dll and then call it from Coldfushion, it does all the calculations necessary, but when it is time to print, ColdFushion returns "printer error" on the webpage. I conducted a test to see if it atleast recognizes the printer, and it does, it just does not want to print to the printer... What can possibly be the problem?
radc0618Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dapperryCommented:
Is the printer supposed to be on the client side or the server side?

:) dapperry
0
radc0618Author Commented:
Server side...

I am operating an online store. When the user clicks the submit order button on my webpage, I want the dll to be called, and the receipt to be printed, so that I know what to send and bill them.
0
radc0618Author Commented:
Adjusted points to 150
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

dapperryCommented:
Are you accessing the dll through CFOBJECT, or some other means?

:) dapperry
0
radc0618Author Commented:
With the following code...

<cfobject type="COM" class="rpcf.rpcf7" action="create" name="test">
<cfset test.PrintReceipt(202,0)>
0
radc0618Author Commented:
I tried printing something to the printer like "Hello" using vbScript and even that doesn't work. It gives me a debug error saying that the Printer Object is not defined. Do you have any ideas as to how I can get ColdFushion to print a string variable to a printer (server side)?
0
radc0618Author Commented:
Adjusted points to 170
0
radc0618Author Commented:
Adjusted points to 290
0
dapperryCommented:
I just did a little test to see if I could print an Access report using CFOBJECT and Access.Application.8.  At first it couldn't recognize the default printer, and then when I specifed the printer (saved in report) it still couldn't find the printer specified.  I'm thinking it may have something to do with the user account that CF uses.  Maybe it doesn't have the rights to print.  To be honest, I am a little miffed myself though.

:) dapperry
0
dapperryCommented:
Now that I think of it the account would probably need the right to log on locally to the server.  I'm going to go check...

:) dapperry
0
radc0618Author Commented:
I'll give that a try...
0
radc0618Author Commented:
Unfortunately, I'm not too sure what exactly I am supposed to do...
0
radc0618Author Commented:
Adjusted points to 307
0
dapperryCommented:
What user is the Cold Fusion App Server service running off of?  Go to services in the control panel, and check which user its running off of.  If its running as system, it probably won't work.  Make an account using User Manager for Domains, that has a lot of admin proviledges, including to log in locally, and then pick that one as the user to run the App Server service.  Haven't got time to try this myself, but give it a shot.

:) dapperry
0
radc0618Author Commented:
Alright, I'll give it a try...
0
radc0618Author Commented:
No luck so far...
0
OeilNoirCommented:
mmm.. i did a CF Apps that do exactly what you say, but i had no problems at all...

What code are you using to print?

i personaly did it in a rich text box, and and used the following code :

rtbPasteImage.SelPrint Printer.hDC

Maybe Try to log on, using the coldfusion accout and see if there is a printer installed for that user? If i remember, i think i had to do that...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
radc0618Author Commented:
Thank you Oeilnoir. You game me the hint that I needed. By the way, did you previously work at iNet?
0
dapperryCommented:
What did you end up doing, making sure that a printer was installed for the CF login?

Just interested,

:) dapperry
0
radc0618Author Commented:
I reinstalled the printer, believe it or not. And now it works. I really do not understand... It seems the program worked all along. I will give you points for helping me too. Just let me accumulate more, and in the future I will post a question, and give it to you.

:)

Thank you.
0
dapperryCommented:
Thanks.  Glad it worked out.

:) dapperry
0
OeilNoirCommented:
Glade i could help, did i posted my "comment as an answer"? if so i'm sorry i 0nly wanted to post a comment, but again, i'm glade it was the hint you needed to go on...

->did you previously work at iNet?

I used to work for INetVideo.com, is what you were refering to?
0
radc0618Author Commented:
Yes, iNetVideo...

That is where I work now... I saw your login name before, that is why I asked you...

0
OeilNoirCommented:
Ahhhh Nice!  hehe how is going the developpment? Glade i could help Inet =)))) Where did you heard about Experts-Exchange? Joe? So the recipt printing work well now? =)

btw, if you have questions, you can always send me an email, if i can answer, i will...

oeilnoir@sogetel.net (i don't check my mail at inetvideo very often)

answer to this on my email...

Later!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.