Focal Point
html question: killing html headers/footers on printing pages

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4281049681

September 21, 2006, 09:39 AM
susannah
html question: killing html headers/footers on printing pages
would anyone know the html syntax for controlling the headers and footers found in the ie/file/page setup? i don't want the entire URL to appear on the page footer when printed, and don't want my users to have to handle this correction themselves.
many thanks.
-s




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
September 21, 2006, 10:36 AM
Francis Mariani
Susannah,

Unfortunately, I don't think this is controllable by HTML, JavaScript or CSS.

I've trolled around on the interweb and while a lot of people are asking for this, no one seems to have a solution.

Cheers.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 21, 2006, 11:16 AM
susannah
alas. thanks, francis, for the confirmation.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
September 21, 2006, 11:28 AM
Tony A
Well ... that's not strictly true. You have to use an activeX object but it is possible.

This sample code will allow you to control most page set-up items using such a control. The control is from Mead Co and can be accessed via the URL in the sample below or you can get it from them and apply it at your site. I have added a hide and display of the printer gif before and after printing so that the image itself doesn't appear on the hardcopy.

I have used it successfully to add a print landscape button on the HTML output without having to change the options.

The values that you set are not visible to the page set-up window until you have clicked on the image.
-* File landscape_print.fex
TABLE FILE CAR
SUM RCOST
    DCOST
    SALES
BY COUNTRY
BY CAR
BY MODEL
HEADING
"Landscape printing using Mead Co's ScriptX"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
ENDSTYLE
ON TABLE HOLD AS MYREPORT FORMAT HTML
END
-HTMLFORM BEGIN
<html>
<head>
<title>Landscape printing</title>
<script language=javascript>
function printReport()
{
  self.PrintButton.style.visibility = 'hidden';
  factory.printing.header = "This is the Header";
  factory.printing.footer = "This is the Footer";
  factory.printing.bottomMargin = 6;
  factory.printing.topMargin = 5;
  factory.printing.leftMargin = 5;
  factory.printing.rightMargin = 5;
  factory.printing.portrait = false;
  factory.printing.Print(true);
  self.PrintButton.style.visibility = 'visible';
}
</script>
</head>
<body>
<div id="PrintButton" style="position:absolute; visibility:visible; top:2; left:650; width:40;
     cursor:hand; z-index:1;" valign="middle" align="center">
  <font size=-1>Print</font>
  <img src="/approot/baseapp/printer.gif" width="20" height="20" alt="Click here to print"
     onclick="printReport();">
</div>
!IBI.FIL.MYREPORT;
<object id="factory" style="display:none" viewastext
        classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
        codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=6,0,0,421">
</object>
</body>
</html>
-HTMLFORM END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 21, 2006, 11:47 AM
Francis Mariani
Very interesting. Thank you very much for this.

I had to install ScriptX by going to this URL:

http://www.meadroid.com/scriptx/smsx.exe

Cheers.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 21, 2006, 11:55 AM
susannah
yes very interesting; i went to meadroid and downloaded the whole thing... will begin experimenting...




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
September 21, 2006, 04:19 PM
Tony A
Perhaps I should ask them for commission? Smiler
September 26, 2006, 02:19 PM
Trav
We've also been using the Meadco ScriptX for a short while and have been very pleased w/ the results. The free portion of the ActiveX was enough for us to get by since you can turn the headers & footers off, specify margins, and control landscape or portrait (big deal). If you're willing to shell out a small amount of money for the control, then you can even control a lot more than that.

The only real downside that I can think of (and this is small) is that the user gets a message asking them to confirm a download if you don't pre-install the ActiveX. Frankly this is very minor in my eyes, because we use a tool on-site that we can use to "push" the install out during off-hours. Since MeadCo offers the .EXE installer, it should work out nicely (I just need to get it done! Smiler )



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
February 18, 2010, 07:11 AM
PBax
doh!!

this is just what I was looking for.... but....



"Due to abuse, the cab file is no longer available for referencing from our servers - apologies for any inconvenience this has caused."

http://www.meadroid.com/scriptx/freedep.asp


81.05 All formats
February 18, 2010, 08:10 AM
Tony A
Perhaps I really should have asked for the commission then Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 18, 2010, 10:07 AM
Francis Mariani
This thing only works on Internet Explorer and who uses that any more?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 18, 2010, 10:34 AM
Tony A
quote:
Internet Explorer and who uses that any more?

Many corporates who also use MS Orifice

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 18, 2010, 10:48 AM
Francis Mariani
Mad I know, I have to! Frowner


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 22, 2010, 02:08 AM
Tony A
Then why not embrace that fact and leave out the stress of anger? Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10