• _PrintStart()

    • Purpose: Marks the beginning of a section that you want to exclude from printing. Any HTML content between _PrintStart() and the corresponding _PrintEnd() will be hidden when the user prints the page.

    • Syntax: __PrintStart()

  • _PrintEnd()

    • Purpose: Marks the end of the section that is excluded from printing.

    • Syntax: __PrintEnd()

  • _ShowPrintButton()

    • Purpose: Displays a "Print" button on the page. When the user clicks this button, the browser's standard print dialog will open, printing only the content that is not excluded by the _PrintStart() / _PrintEnd() markers.

    • Syntax: __ShowPrintButton()

    Example:

  • HTML

  • __PRINTSTART 
  • <p> This will not be printed. </p> 
  • __PRINTEND
  • 
    	
  • __SHOWPRINTBUTTON  
  • 
    	
  • <p> This will be printed. </p> 
  • How it Works:

  • The section between __PRINTSTART and __PRINTEND will be visually hidden on the page when the user initiates the print action.

  • The __SHOWPRINTBUTTON inserts a "Print" button.

  • Clicking this button triggers the print process, showing only the content outside of the designated hidden section.

    Use Cases:

  • Print-friendly formatting: Create a cleaner print version of your page by hiding navigation, ads, or other elements not essential for a printout.

  • Receipts or tickets: Generate printable receipts with only the necessary information.

  • Selective printing: Offer users options to print specific sections of a page.

    Important Notes:

  • These commands likely rely on CSS and JavaScript working together behind the scenes to manipulate the page for print.

  • Browser compatibility for this type of functionality may vary.