|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
132 col dot matrix printing from IE
This issue is probably one of the most annoying ones I have ever seen. 99.999% of businesses use dot matrix printers with continuous stationery, but html seems to have no support for them.
Let me explain. I am writing web reports, linked to SQL server. This database is to replace an old Informix based one. The old system prints text reports on continuous stationery, 132 columns. At the moment I am using the Generic/Text only driver. The printer is a Printronix P5005B, but it has Epson FX/IBM Proprinter compatability. So basicly it is your stock standard, run-of-the-mill dot matrix printer. The problem is getting the printouts to use the full width of the paper. In Internet Explorer, there are various paper formats, but none that matches this one. The paper is about 15x9 inches. The closest format available in IE is 15x11. I am using Internet Explorer 6.0, Win2K (not by choice, don't bother suggesting other OS, etc). When I use this format, the whole width of the paper is used, but the only way to see this is to print a plain text file from IE. Doing this, about every 5th character is two characters together. The output is squashed together slightly. I can't find how to specify the font width for text-files in IE. I can of course use a style sheet to specify the font, but as soon as I make the file html, the size of the content is limited by the window. I can of course use an inline div to set the width of the page (by style sheet or simply width=1200, etc.), this will be my next endeavour. What I need to know is: Is there a way to explicitly specify the font size for text-files in IE? Alternatively, if I must use a style to set it, and a div to set the width of the page, how does the point (ie. 10pt, etc) relate to characters per inch? For example, if the printer uses 12 characters per inch, how does that relate to pt's. There has to be many readers who have gone through this quagmire already. Any advice? Thanks. -vertigo- |
|
#2
|
|||
|
|||
|
RE: 132 col dot matrix printing from IE
In our company we have some webpages with a print button. and if you press the print button its printed from the server. this way we have 100% control over the printer and don't have to worry about the client.
|
|
#3
|
|||
|
|||
|
slight progress
I have found now that using a PRE tag with customised font-size and line-height seems to work well.
Using the following styles results in the characters being properly dimensioned: BODY { padding: 0px; margin: 0px } PRE { font-size: 18px; line-height: 55% } I then set the page margins to 0, lost the header and footer, and it seems to be printing relatively correct. Unfortunately, everything on the page will now need to be padded with spaces to the correct width, because the PRE keeps all whitespace. I can't help but think there must be an easier way to do this. This is vaguely reminiscent of formatting input screens in console apps. I may implement a gotoxy function that pads spaces/n's to reach the desired column. Much fun... |
|
#4
|
|||
|
|||
|
RE: 132 col dot matrix printing from IE
And what if you use a fixed-width font such as courier? (meaning: lose the <pre>, but use something like <span style="font-family: courier"> )
Note that in modern browsers it is possible to set different styles for print and screen media in CSS. |
|
#5
|
|||
|
|||
|
RE: 132 col dot matrix printing from IE
Are you saying I shouldn't use padded spaces to set cell widths/cell spaces? I can use a large table, and style all the TD's as Courier, etc.
Different columns are padded differently. For example, some columns are 1 char apart, some are 5 apart. I could give each column a seperate class, and style left and right margins for each. That would possibly be slightly more structured. But what do I do when data for a cell is too large? I have written a quick function to handle padding trimming and right/left justification for a cell, perhaps I should use this in conjunction the the styled table. When padding the TD's I will use multiples of 18 pixels. How do you specify different styles for print/screen? |
|
#6
|
|||
|
|||
|
RE: 132 col dot matrix printing from IE
hmm, and I thought the problem was in the fact that <pre> keeps whitespace.
I guess you should be able to use PHP for the padding and all. As for different styles for print and screen, check this: http://www.w3.org/TR/REC-CSS2/media.html |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > 132 col dot matrix printing from IE |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|