/    Sign up×
Community /Pin to ProfileBookmark

Print without images

Hi, I have pages where some of the images force the text to the right, resulting in some of the text being chopped off when printing.

The text is enclosed in a table which must be a set width, not relative.

Is there a script which will load the same web page into a window, but without images and then auto-fire the print window?

I need to keep the text formatting but just lose the images… or have them resized to zero if they can’t be lost.

many thanks in advance if you can help. ?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@mjdamatoDec 09.2006 — A better approach, in my opinion, would be to use style properties. You can set different style properties for an element when viewed in a browser, on a PDA, when printed, etc. Simply set the style for the image when printed to none.

Simply give the image a class like this:

<img href="image.jpg" [b]class="noprint"[/b]>

Then add this to your stylesheet:

@media print {

.noprint { display: none; }

}

Now, the image will appear when viewed onscreen but will not appear when printed - and other elements will shift, as appropriate to fill the missing space.
Copy linkTweet thisAlerts:
@W8_4meauthorDec 09.2006 — I wish I stopped using absolute layers... actually I can just make the css command !important ...
×

Success!

Help @W8_4me spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...