View Full Version : Alternate document for printing button...

El Huevo
03-02-2006, 01:43 AM

I'm trying to use this script, and I followed instructions that comes here:


I added a script so at the bottom of the page appears a button that does the same function if u select "Print" on the browser, but every time I click on the button the printer loads but it prints this:

Not Found

The requested URL /transporte.doc was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

But the file "transporte.doc" does exist in the server, so I dont know what I'm doing wrong, thanks in advance.

My problem is on this page:

El Huevo

03-02-2006, 10:45 AM
I'm trying to use this script, and I followed instructions that comes here:

http://www.dynamicdrive.com/dynamicindex9/printstyle.htmIf at all possible, I would suggest that you don't. Use a print style sheet to specify the look of the document when printed.

The process is somewhat similar, in that you use a link element to include the style sheet with a 'print' media attribute value:

<link rel="stylesheet" type="text/css" href="..." media="print">
This will work on many browsers, reliably, not just IE.

My problem is on this page:

http://www.ethelycarlos.com/comollegar.htmThere are several stylistic and technical problems with that document (and potentially your site):

The black text is pretty much unreadable on that background.
There are color property declarations without corresponding background properties. This can lead to colour conflicts when the user doesn't have the default colour scheme that you expect (for example, they use a themed desktop).
The background image specified in the style sheet doesn't have an accompanying background colour. This can lead to similar problems as described above, particularly if the background colour that would be used is different from the effective colour of the image (a dark red, in this case).
Font sizes are specified in pixels. IE cannot resize these, which is an accessibility issue. Font sizes should use percentages, and body text should be 100% (with nothing lower than 85% of default). The em unit, whilst better than pixels, can also cause problems with IE as it calculates the effective size incorrectly.
In general, do not use Verdana, especially if you're going to make the font size smaller. Verdana has an aspect value (ratio of x-height to font size) that is significantly larger than other fonts. Whilst this makes it more readable at smaller sizes, substitute fonts (not everyone has Verdana) with more typical aspect values will be an unreadable mess; disasterous combined with the inability to resize, above.
Remove the SGML comments from the in-line style sheet.
Class names should be semantic; meaningful. This helps with maintainability, as well as following the general principle of markup languages. Names that are presentational in nature (blueText, for example), or are just plain bad (style1), should be avoided.
Tables should be reserved for tabular data only. Whilst some of the content of that document is tabular, not all of it is. Not only is this a semantic improvement, but it also makes presentation more flexible.

El Huevo
03-02-2006, 05:23 PM
Ok, thanks Mike, I'm working on changing the styles to solve the problem, I'll post back once its done and to say its effects and to say if it solved the problems, thanks for your time. :)

El Huevo