Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old April 14th, 2008, 09:09 PM
tvc3mye's Avatar
tvc3mye tvc3mye is offline
Daniel Schildsky
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: KL, Malaysia.
Posts: 545 tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 12 h 16 m 54 sec
Reputation Power: 154
Send a message via ICQ to tvc3mye Send a message via MSN to tvc3mye Send a message via Yahoo to tvc3mye
Problem printing on custom carbon slip

Good day,

I have a Panasonic KX-P1121 dot matrix printer attached to a printer server and a Windows 2003 box hosting an application which issues web application login pin slips to clients. The dot matrix printer is printing continuous feed of carbon slip sheets, in which each slip sheet is measured 14cm height x 20 cm width in size.

I wrote a simple application with VB 6 using Data Report designer. I trield to set the report width and height to the actual size of a standard slip. But when it prints to the dot matrix printer, somehow the user id and the PIN was printed on the correct position for only the first sheet. Subsequent sheets have observed the user ID and PIN being printer slightly higher to the position it was supposed to be printed.
It is observed that these details were printed higher and higher for subsequent sheets too.

I tried testing the print from my local PC attached to a local printer with the exact same model. It was working well. But when I deployed the program to client side, the problem occurs no matter how hard I tried to adjust the width and height properties in the Data Report designer. I even tried to hard code these properties programmatically but the problem still persists.

Can anybody help me? Thanks in advance.
__________________
When the programming world turns decent, the real world will turn upside down.

Reply With Quote
  #2  
Old April 14th, 2008, 11:04 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,716 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 33 m 54 sec
Reputation Power: 688
When I did some VB to print labels on continuous form stock, I had to setup the printer as a generic/text only and bypass the windows printer drivers. Proportional fonts don't do well with preprinted forms.

Other things to look for, most printers allow you to set LPI in the printer, maybe the failing printer is configured different from your test printer. Also compare the printer settings you're using between the two locations.
__________________
======
Doug G
======
"Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton

Reply With Quote
  #3  
Old April 15th, 2008, 03:21 AM
tvc3mye's Avatar
tvc3mye tvc3mye is offline
Daniel Schildsky
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: KL, Malaysia.
Posts: 545 tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 12 h 16 m 54 sec
Reputation Power: 154
Send a message via ICQ to tvc3mye Send a message via MSN to tvc3mye Send a message via Yahoo to tvc3mye
How to configure generic/text printer?

Thanks for the reply. But how do I configure the generic/text as mentioned? Do I use coding to do that? or do I configure it via windows' control panel?

Reply With Quote
  #4  
Old April 15th, 2008, 10:15 PM
tvc3mye's Avatar
tvc3mye tvc3mye is offline
Daniel Schildsky
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: KL, Malaysia.
Posts: 545 tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 12 h 16 m 54 sec
Reputation Power: 154
Send a message via ICQ to tvc3mye Send a message via MSN to tvc3mye Send a message via Yahoo to tvc3mye
Printer Skips pages

Hi all,

I have tried another way to print content on exact location without using DataReport Designer. I used Printer.Print,Printer.CurrentX and Printer.CurrentY methods to pinpoint exact location for printing on preprinted forms.

While this works on all pages printed, the printer skips a sheet after completed printing every page before starting the next. I tested with 3 pages. The first one printed successfully at the right position, but then the printer skips one whole sheet and started to print the second page on the next sheet. I already set the following in my code before entering the loop:

VB Code:
Original - VB Code
  1.  
  2.   Printer.Font = "Arial"
  3.   Printer.FontSize = 10
  4.   Printer.FontBold = False
  5.   Printer.ScaleMode = ScaleModeConstants.vbMillimeters
  6.   Printer.Width = 200
  7.   Printer.Height = 140
  8.   Printer.Orientation = vbPRORPortrait


The printer seems to treat the continuous feed as an A4 paper. Is there any ways to stop printer from skipping an entire sheet before printing the next page? Please help. Thank you.

Reply With Quote
  #5  
Old April 18th, 2008, 11:30 AM
tvc3mye's Avatar
tvc3mye tvc3mye is offline
Daniel Schildsky
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: KL, Malaysia.
Posts: 545 tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 12 h 16 m 54 sec
Reputation Power: 154
Send a message via ICQ to tvc3mye Send a message via MSN to tvc3mye Send a message via Yahoo to tvc3mye
Solved!

Hi all. I've got it solved.

Seems like the printer cannot accept custom size setting via code. So I treated 2 sheets as a single letter sized paper to print out.

Used Printer.Print instead of DataReport and it worked!

Reply With Quote
  #6  
Old April 18th, 2008, 07:52 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,716 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 33 m 54 sec
Reputation Power: 688
I'm glad you found a solution. Printing layout problems are nearly impossible to debug without actually seeing the printer output

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Problem printing on custom carbon slip


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway