Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trying to suppress swfobject flash from printing

Featured Replies

Hi

 

I am trying to stop my flash division from printing. The flash is embedded using swfobject and I am setting the div visibility to hidden, however the flash image stills prints:-

 

<div id="picdiv">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="397" height="533" id="wpaboutus">

<param name="movie" value="wpaboutus.swf" />

<!--[if !IE]>-->

<object type="application/x-shockwave-flash" data="wpaboutus.swf" width="397" height="533">

<!--<![endif]-->

<p class="pintrotextgrey">The site is designed to display a flash slideshow here.<br /><br />

<br /><br />

If you would like to install the flash player follow the link below:-</p>

<a href="http://www.adobe.com/go/getflashplayer">

<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />

</a>

<!--[if !IE]>-->

</object>

<!--<![endif]-->

</object>

 

 

--------------------------------------------------------

 

<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript">

swfobject.registerObject("wpaboutus", "9.0.0", "expressInstall.swf");

</script>

 

-------------------------------------------------------------

 

Any thoughts?

got the css from your print style sheet as well?

  • Author

#picdiv {

width: 0px;

text-align: center;

margin:0;

padding:0em;

visibility:hidden;

}

what about

 

object#wpaboutus {
   width: 0px;
text-align: center;
margin:0;
padding:0em;
visibility:hidden; 
}

 

or

 

#picdiv{
width:397px;
height:533px;
}

object#wpaboutus {
margin:0;
padding:0em;
display:none; 
}

  • Author

Thanks "bocaj" the first option did the trick.

 

I must confess I was confused why the <div> hidden parameter didn't work however your suggestion supressed the image print.

 

It still seems to leave space at the end of the print = to the size of the div, noticible as it is contained within a div with a border however removing the image was the important bit.

 

Once again thanks for your help on this.

 

Steve

  • Author

Thanks "bocaj" the first option did the trick.

 

I must confess I was confused why the <div> hidden parameter didn't work however your suggestion supressed the image print.

 

It still seems to leave space at the end of the print = to the size of the div, noticible as it is contained within a div with a border however removing the image was the important bit.

 

Once again thanks for your help on this.

 

Steve

 

 

I'm sorry for being a lazy B....r, tried the second option and that cured the spacing issue.

 

Your a star "bocaj" :clapping:

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.