12 replies [Last post]
coloq
Offline
newbie
Last seen: 17 years 6 weeks ago
Joined: 2003-12-15
Posts: 6
Points: 0

Hi all,

I ve got a serious problem with my application. I'm currently developing an application that create a catalog. Then for printing pages it generates some HTML with VBScript and JScript (ASP).

When i try to see my catalog with IE6 all is ok. All CSS are displayed correctly. All is fine.

When i try to print out my catalog, with Print Preview of IE6, something goings wrong. Some text in some DIVs is "shrinked" or "stretched". So if i see 8 rows of text in the DIV, in the IE6 Print preview the text will be 7 rows.

Try this and look on IE6:

<html>

	<head>
		
		<meta name="generator" content="Microsoft Visual Studio 6.0">		
		
		<link rel="stylesheet" type="text/css" href="styles.css"> 
				
	</head>

	<body>
						
		<% 'ReadInstructions %>
		
		<% 'MakeCatalog %>		
		
		<DIV style="width: 176px; font-family: Verdana; font-size: 10px; line-height: 12px; text-align: justify; text-justify: newspaper; border: solid 1px balck;">						
				
				Giro giro tondo, casca il mondo, casca la
				terra, tutti giù per terra. Am barabà cici
				co co. Tre civette sul comò. Che facevano
				l'amore, con la figlia del dottore, il
				dottore si ammalò. Am barabà cici co co. 1
				2 3 4 5 6 7 8 9 10. A B C D E F G H I L M
				N O P Q R S T U V Z.									
			
		</DIV>						
		
	</body>

</html>


I have attached example file with screen shot of the problem...

Can anyone help me PLEASE !!!

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 17 years 10 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

Printing ASP pages, IE6 print previw shrink my text !!!

It does not look like you are using a print stylesheet. You need to set one up.

http://www.alistapart.com/articles/goingtoprint/

Regards
Day

The only way to learn is to do it yourself

coloq
Offline
newbie
Last seen: 17 years 6 weeks ago
Joined: 2003-12-15
Posts: 6
Points: 0

Printing ASP pages, IE6 print previw shrink my text !!!

Hi.

Sorry, but I don't think CSS solve my problems because the original source of my ASP pages got thousands of Style Sheet.

The example that i have posted is basic code only with the div and the style property set. If you try download my file and use the "style" property as a CSS style you'll see the same thing happend..... or if you wnat make on your own a div set some style property like "WIDTH, FONT-FAMILY, LINE-HEIGHT, TEXT-ALIGN", fill with text and look the differences when your are going to print with IE6

I can't belive that anyone got the same error....

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 6 days 10 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Printing ASP pages, IE6 print previw shrink my text !!!

Hi coloq,
It would be much easier for us to understand if you could link to the page and css file.
But there is no reason why you can't specify a print style sheet here's your example slightly modified.

<html> 
 
   <head> 
       
      <meta name="generator" content="Microsoft Visual Studio 6.0">       
       
      <style type="text/css" media="print"> 
      div{color:red; font-weight:bold;} 
      </style> 
             
   </head> 
 
   <body> 
                     
      <DIV style="width: 176px; font-family: Verdana; font-size: 10px; line-height: 12px; text-align: justify; text-justify: newspaper; border: solid 1px balck;">                   
             
            Giro giro tondo, casca il mondo, casca la 
            terra, tutti giù per terra. Am barabà cici 
            co co. Tre civette sul comò. Che facevano 
            l'amore, con la figlia del dottore, il 
            dottore si ammalò. Am barabà cici co co. 1 
            2 3 4 5 6 7 8 9 10. A B C D E F G H I L M 
            N O P Q R S T U V Z.                                
      </DIV>                   
       
   </body> 
</html>

In print preview the text is red and bold.

Hope that helps

coloq
Offline
newbie
Last seen: 17 years 6 weeks ago
Joined: 2003-12-15
Posts: 6
Points: 0

Printing ASP pages, IE6 print previw shrink my text !!!

Hi all,

I think anybody understand the real problem (probably my bad english... ehehe)...

I'll try to explain better:

1- There is no web site, i'm using ASP page to make something like reports for an application made with Visual Basic.

2- There is no CSS guilty.... the problem is on the Internet Explorer print preview...

Let's go to reproduce the problem:

1- Open a new HTML page

2- Create a CSS like that or set "style" property of the div:

  myDiv
  {
     width: 176px;
     
     font-family: tahoma;
     font-size:    12px;
     
     text-align:   justify;
     text-justify: newspaper;

     line-height:  14px;

     border:        solid 1px black;
  }

3 - Create a div, set the CSS style and write inside something like this

  <div class="myDiv">
    
    London bridge is falling down, falling down falling down.
    London bridge is falling down....
    uhiohi ho uih oiu hiu hiuh uin ih oh iu ni ou hon oi nh nu oi
    iojinj ioj i j ij  oj oj o j ij poij iop jp oij po jip j pio j ipo 
    oiu y iu h iuh uh u huio h iuoh 

  </div>

4 - Open IE6 and see the page... nice uh?

5 - make a Print Preview from IE6 and look ? what? they are differnts? Yes!

Download my file[/b]

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 17 years 10 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

Printing ASP pages, IE6 print previw shrink my text !!!

coloq

We do understand.

1) we can see your picture
2) we understand that it is different in IE SCREEN VIEW than PRINT VIEW.

But -

a) Quite often print view and print will be different than looking at page in screen, because they use different measurements. It is not a bug!
b) In the old days, developers would provide a special page users could go to for printing.
c) Nowadays we use CSS print media to get around the problem.
d) We do not know if that is your problem as we can not view the code behind the site.
e) Even if you do have a print media stylesheet, that is the code we need to look at to see why you have a problem.

Please provide a link, and we will be able to help.

Regards
Day

The only way to learn is to do it yourself

coloq
Offline
newbie
Last seen: 17 years 6 weeks ago
Joined: 2003-12-15
Posts: 6
Points: 0

Printing ASP pages, IE6 print previw shrink my text !!!

Hi all again,

thx to all for your patient !!!

As i said, THERE IS NO web site. It's a Visual Basic application just use ASP pages to make reports.

I have attache the source (ASP) that create the catalog by an XML file enjoy....

PAY ATTENTION: In this ZIP there is a FAKE instructions.xml file (the data needed to build the catalog) because the forum allow me only to upload file of size up to 64kb.... if you can provide me a valid e-mail i'll send to you the valid file

Hey... i'am a newbie of HTML and Scripts so please if you think you have something to tell me about my work i very happy to learn !!!

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 6 days 10 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Printing ASP pages, IE6 print previw shrink my text !!!

Hi Coloq,
We don't need to see what goes into the server we need what come out the other side to the client or browser.
If your application can be viewed in a web browser, right click, view the source and save that as a html file then attach it.

Hope that helps

coloq
Offline
newbie
Last seen: 17 years 6 weeks ago
Joined: 2003-12-15
Posts: 6
Points: 0

Printing ASP pages, IE6 print previw shrink my text !!!

As you wish.... but you have to provide me an e-mail because the file Zipped or "Rared" is always 100kb Smile

coloq
Offline
newbie
Last seen: 17 years 6 weeks ago
Joined: 2003-12-15
Posts: 6
Points: 0

Printing ASP pages, IE6 print previw shrink my text !!!

--> :?: <--

I'm waiting for an answer.... if you don't want to give me your e-mail doesn't matter...

I have some web-designer friends that are going to provide me a valid link where you can soon download my files with no danger....

However are you still alive ?

dJomp
dJomp's picture
Offline
Enthusiast
Last seen: 4 years 51 weeks ago
Joined: 2003-03-23
Posts: 422
Points: 0

Printing ASP pages, IE6 print previw shrink my text !!!

Tony's email is available in his profile...

But it would be more useful if it could be 'hosted' elsewhere, so we can all have a look... sure we all have other things on our mind with Christmas close, and don't have the same amount of time to devote to solving problems!

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 6 days 10 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Printing ASP pages, IE6 print previw shrink my text !!!

Hi coloq,
I really don't want people emailing me directly to solve a problem so would rather you find a better way to provide the source to everyone.

Let us know once your friends have uploaded the files.

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 17 years 10 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

Printing ASP pages, IE6 print previw shrink my text !!!

Hi Coloq

Just so you understand - Active Server Pages or ASP, as it is more commonly known, is a technology that enables you to make dynamic and interactive web pages.

Whether you are using the asp pages

a) for a web site
b) intranet
c) for reports viewed in a browser and then printed
d) Sent directly to a printer.

they are still html.

If you want it to print properly there are two choices -

a) change the format of the current page.
b) provide a print stylesheet.

If (a) and the format does not matter for viewing, as it will only ever be printed then try this -

Change all measurements from px to pt. px is a screen measurement, while pt is a printer measurement. (0.75pt=1px)

for example

<DIV style="width: 132pt; font-family: Verdana; font-size: 8pt; line-height: 9px; text-align: justify; text-justify: newspaper; border: solid 1pt black;">

then resize anything that needs to be resized based on how it prints.

Regards
Day

The only way to learn is to do it yourself