199 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Using Selectize for List Boxes and Combo Boxes in XPages
Fri, Jun 23rd 2017 136
Using SweetModal in XPages: Alert, Confirm, Prompt and Modal- Only Better!
Thu, Jun 22nd 2017 145
Using flatpickr a Lightweight and Powerful Datetime Picker in XPages
Wed, Jun 21st 2017 129
Replay IBM Notes Domino XPages Webinar - SmartNSF - 100% Smart - and in Color!
Tue, Jun 20th 2017 56
ApplicationInsights Quick Start Series
Tue, Jun 6th 2017 11
XPages Webinar: SmartNSF - 100% Smart - and in Color!
Mon, Jun 5th 2017 12
Domino and XPages Applications You Can Only Dream Of
Mon, Jun 5th 2017 10
Top 10
Using SweetModal in XPages: Alert, Confirm, Prompt and Modal- Only Better!
Thu, Jun 22nd 2017 145
Using Selectize for List Boxes and Combo Boxes in XPages
Fri, Jun 23rd 2017 136
Using flatpickr a Lightweight and Powerful Datetime Picker in XPages
Wed, Jun 21st 2017 129
Replay IBM Notes Domino XPages Webinar - SmartNSF - 100% Smart - and in Color!
Tue, Jun 20th 2017 56
IBM Domino and IBM Notes 9.0.1 FP7 available for download on IBM Fix Central
Tue, Sep 13th 2016 43
Using the Bootstrap 3 DateTime Picker Plugin including Moment.js and Locales in XPages
Wed, Jun 3rd 2015 22
IBM Notes Domino 9.0.1 Feature Pack 8 Preliminary Fix List and New Features
Sat, Jan 28th 2017 19
IBM Client Application Access 1.0.1 (ICAA) Enhancements
Sun, Jun 26th 2016 18
Notes Domino 9.0.2 and Notes Domino 9.0.1 Fix Pack 7
Sat, Jul 30th 2016 18
IBM Notes Domino 9.0.1 Fix Pack 5 Released
Mon, Nov 30th 2015 17


XPages Tip: Hide Elements from Printing on an XPage using CSS
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
   



For an XPages project I was asked whether it was possible to print only the viewPanel on an XPage and not all other elements such as an iframe and a widgetContainer by making use of a print button with a simple window.print() function. A good practice in this case is to use a style sheet specifically for printing and and set it's media attribute to print.

<xp:styleSheet href="/print.css" media="print"></xp:styleSheet>

Using the CSS @media rule it is very easy to initially add a class 'no-print' with display:none !important. This class can then be used to hide the elements which should not be printed.
To hide the header and footer which contains the page title, file path, page number and date @page can be used with the setting 'margin:0'. Since the contents will extend to page's limits, the page printing header/footer will be absent. in this case some margins/paddings in the body element should be set so that the content won't extend all the way to the page's edge. This works in Chrome and Firefox but not in Internet Explorer.
To avoid additional print-out of link information in the output the last rule in the CSS file below can be added to the @media print section:

The CSS file looks like this.

@media print
{  
    .no-print, .no-print *
    {
        display: none !important;
    }
}
@page {
    size: auto;   /* auto is the initial value */
    margin: 0;  /* this affects the margin in the printer settings */
    body { margin: 1.0cm; };
}
a:link:after, a:visited:after {
    content: "";
}

On the XPage it is now possible to use the class 'no-print' to 'hide' the specific element from printing.

<div class="no-print">
<xp:panel>  
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/O3Xfd3Xyz8g?autoplay=1;controls=0;loop=1;playlist=O3Xfd3Xyz8g"
frameborder="0" allowfullscreen="">
</iframe>
</div>

The above is a quick solution by making use of a stylesheet on the XPage.

---------------------
http://xpagesandmore.blogspot.com/2017/03/xpages-tip-hide-elements-from-printing.html
Mar 14, 2017
4 hits



Recent Blog Posts
136
Using Selectize for List Boxes and Combo Boxes in XPages
Fri, Jun 23rd 2017 9:37a   Johnny Oldenburger
Selectize is the hybrid of a textbox and box. It's jQuery based and it has autocomplete and native-feeling keyboard navigation; useful for tagging, contact lists, etc. It clocks in at around 7kb (gzipped). The goal is to provide a solid & usable user-experience with a clean and powerful API. Selectize is a lot like Chosen, Select2, and Tags Input but with a few advantages. In order to use Selectize, the JavaScript and CSS file(s) need to be included on the XPage / Custom Control. The lates
145
Using SweetModal in XPages: Alert, Confirm, Prompt and Modal- Only Better!
Thu, Jun 22nd 2017 12:50p   Johnny Oldenburger
One of the requirements for a new XPages Project constisted of a lightweight and powerful Confirm, Alert, Prompt and Modal functionality. In my search I came across SweetModal, a lightweight and powerful jQuey Plugin. In order to use SweetModal, the JavaScript and CSS file(s) need to be included on the XPage / Custom Control. The latest version can be downloaded from GitHub: SweetModal. Below a basic example how SweetModal can be used in an XPages application. Adding the JS and CSS files The Ja
129
Using flatpickr a Lightweight and Powerful Datetime Picker in XPages
Wed, Jun 21st 2017 12:30p   Johnny Oldenburger
One of the requirements for a new XPages Project constisted of a lightweight and powerful Datetime Picker functionality. In my search I came across flatpickr, a lightweight and powerful Datetime Picker. Lean, UX-driven, and extensible, yet it doesn’t depend on any libraries. There’s minimal UI but many themes. Rich, exposed APIs and event system make it suitable for any environment. In order to use flatpickr, the JavaScript and CSS file(s) need to be included on the XPage / Custom Control. T
56
Replay IBM Notes Domino XPages Webinar - SmartNSF - 100% Smart - and in Color!
Tue, Jun 20th 2017 6:15a   Johnny Oldenburger
On June 13 th a very interesting webinar was organized by T.L.C.C and Team Studio, SmartNSF - 100% Smart - and in Color! by Christian Guedeman and Martin Jinoch. For those who missed this webinar below the content, slides and video. Content SmartNSF is one piece of the IBM Domino application modernization puzzle! Learn how you can turn a simple Domino database (NSF) to a smart microservice within minutes. If you are new to the world of REST APIs, Microservices, OpenApi Specification and YAML do
11
ApplicationInsights Quick Start Series
Tue, Jun 6th 2017 5:31a   Johnny Oldenburger
Starting April 11, 2017, customers who are current on IBM Software Subscription and Support (S&S) for Domino Enterprise Server, Utility Server, or Dual Entitlement with Applications will be entitled to panagenda ApplicationInsights at no cost. See this blog post for important details pertaining to this offering. ApplicationInsights is an offering from panagenda that allows customers to get a detailed analysis of their application landscape in IBM Domino. ApplicationInsights provides key a
12
XPages Webinar: SmartNSF - 100% Smart - and in Color!
Mon, Jun 5th 2017 5:56p   Johnny Oldenburger
On Tuesday, June 13th (my Birthday) a very interesting webinar will be organized by T.L.C.C and Team Studio, SmartNSF - 100% Smart - and in color! by Christian Guedeman and Martin Jinoch. The registration for this webinar is available on the T.L.C.C website. Content Webinar SmartNSF is one piece of the IBM Domino application modernization puzzle! Learn how you can turn a simple Domino database (NSF) to a smart microservice within minutes. If you are new to the world of REST APIs, Microservices
10
Domino and XPages Applications You Can Only Dream Of
Mon, Jun 5th 2017 4:46p   Johnny Oldenburger
Great 'new' development products, tools and techniques continue to further develop and evolve within the IBM Notes Domino and XPages world. Some are free to use for others has to be paid. ClevaDesk is one of these amazing products which continues to evolve. ClevaDesk system expands IBM Notes Domino capabilities and gives it new life. There is no need to think about migrating to other technologies. ClevaDesk is a flexible IT-system with a set of business applications, a Designer to build IT-sys
10
Webinar Replay: Unlocking the Power of IBM Connections 6
Mon, Jun 5th 2017 4:28p   Johnny Oldenburger
On Wednesday, May 3 a very interesting webinar was organized by Maarga Systems, Unlocking the Power of IBM Connections 6.0. For those who missed this webinar below the content and the video. Content IBM has recently released the newest version of their Enterprise Collaboration Software – IBM Connections 6.0 that will bring new capabilities to Enterprise Social Networks for a simpler collaboration across the workforce and employee onboarding experience. IBM Connections 6.0 has new functionalit
6
Replay IBM Notes Domino XPages Webinar - Back from the Dead: When Bad Code Kills a Good Server
Tue, May 9th 2017 5:10a   Johnny Oldenburger
On May 2 a very interesting webinar was organized by T.L.C.C and Team Studio, Back from the Dead: When Bad Code Kills a Good Server by Bill Malchisky Jr. and Serdar Basegmez. For those who missed this webinar below the content, slides and video. Content It's Friday and a new customer calls. Their mission critical app is taking :05 to open documents and the users are quite concerned. Where do you start when handed a 20-year-old application you have never seen, on a server you barely know? Join
11
IBM Domino 9.0.1.Feature Pack 8 Interim Fix 3 Available for Download on IBM Fix Central
Sun, May 7th 2017 4:43p   Johnny Oldenburger
IBM Domino 9.0.1.Feature Pack 8 Interim Fix 3 is available for wownload on IBM Fix Central. Fix List updates in progress. Note: Domino 9.0.1 FP8 IF3 is a pre-req for Verse On-Premises 1.0.1. Download link: Interim Fix 2 for Domino 9.0.1 Feature Pack 8




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition