Forum Moderators: open

Message Too Old, No Replies

Backend printing in ASP

Invoices and Labels

         

Jimmy_Blue

9:29 am on Sep 12, 2003 (gmt 0)

10+ Year Member



Hi

Does anyone know of a solution in asp (or whatever) that would enable me to print invoices and mailing labels from the site. It is purely going to be a backend feature so customers will not have and do not need access.

Many thanks in advance.

txbakers

1:20 pm on Sep 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Jimmy,

I have successfully conquered the label printing in ASP from the web.

I'm going to ask one of the mods to move your post to the ASP forum where we'll generate a better discussion.

Rather than post the lengthy code that I used to do it, I'l just share somepointers.

For the standard 3 X 10 address label page, I took measurements of the first row of labels fro the top and the left side. And took the distance from the top of the first label to the top of the next row of labels.

I used absolute positioning CSS to place each label, increasing the mm positioning by "X" to get it to line up correctly.

The problem was the page breaks.

I counted 10 rows, then reset my counter. If my counter was back to 10, then instead of the regular lineHeight + X for the next label I used lineHeight + X + pgBrk. pgBrk was the hardest to deal with. I ultimately went with a dynamic situation for that as well - letting each user detemine what their page break number should be.

Haven't had one complaint since I implemented that new system.......Yippee!

plumsauce

4:38 am on Sep 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




txbakers,

did you use printing stylesheets?

++++

Jimmy_Blue

9:08 am on Sep 13, 2003 (gmt 0)

10+ Year Member



Many thanks for you response txbakers. Sounds like it's going to take a little trial and error to get it right but I'm very reassured that you have been succesful.

Any chance that you could sticky me so that I can see it in action?

aspdaddy

10:30 am on Sep 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Another solution is to allow IE to create a word activeX and open a template that resides on the client machine.

The template needs to have bookmarks, and the script writes the invoice data to them.

You need to do this in client side vbScript not ASP.

Jimmy_Blue

12:15 pm on Sep 15, 2003 (gmt 0)

10+ Year Member



Sounds very interesting aspdaddy!

Ar there any 3rd party solution availbale for this type of thing?

txbakers

2:41 pm on Sep 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I looked into using an ActiveX because I was getting disgusted with my web solutions (before I stumbled on my current solution.)

I went so far as to list it on one of the pay-for-script sites and got some response.

The big problem with ActiveX is that it is very intrusive on the client machine. The user gets a warning saying that they need to grant permission to download and install this software. You might have to get a certificate for it ($$) and many users have ActiveX controls disabled. These can be malicious, so people are wary of them.

On this particular application I didn't using printing style sheets, because the format is for the printer to begin with.

I do use absolute positioning CSS to position each label on the screen.