printing issues caused by difference in printers.

NJDubois

Well-known member
Joined
May 15, 2008
Messages
84
Programming Experience
Beginner
I designed this software to work with a database, and print custom reports made for my client. Really straight forward stuff, print at this x and y....thats that.

The printer I used in development had two paper feed guides that kept the stock centered in the paper tray. So no matter what type of envelope they use, the label would always be centered. The problem showed itself when the printer being used died and they had to switch to a backup printer that has only one paper feed and pushes the stock to the right, but the program still thinks it is being centered so it prints the label but its not on the stock.

The easy fix would be to add a check box "check here if using a single feed guide printer" kinda thing. This way I just subtract from the final Y position to make it center. But what happens if they switch to another printer, and maybe that one is left aligned?

This is new to me, and I am unsure how to solve this issue. I know that windows keeps all sorts of information about the printer, and that this info is easily accessible. But I do not think that the printer is communicating the location of the paper feed guides, or how many there is. Maybe it is? I don't know!

Lets assume that the printer is setup in windows to be using 'letter' sized paper.

So that's my question. Is there a simple, elegant way to solve this? I'm not even sure if I am asking the right question, or if this is in the right part of the forums. For this I apologize. If you need an example of the code I am using please ask. I'm not using anything special, just the printer code built in to vs.net.

Thanks for the help ahead of time. As always much love to the vbdotnet forums. Always the first place I look when google fails me, or I'm lost as to what to look for.

Nick
 
It sounds like you are using a page width in your printing routine that is not necessarily the actual width of the paper in the printer. You should allow the user to set the page dimensions in your app and then you can centre your label within those bounds. It's for just this sort of thing that the PageSettingsDialog exists.

Of course, the user must make sure that the printer knows what size paper it contains too.
 
Back
Top