Button to Print in OutSystems

Button to Print in OutSystems

  
Hello! I wonder if would like to make a button on OutSystems to when tight print the page. As you would do that?
Hi Philipe,

YoAs I can see it, you can do two things:
1. Add some javascript to the button that prints the page and add to the CSS exceptions with the @Media tag for the pieces you don't want to see in the printed page.
The CSS will look something like this:
@media print {
    /* Print CSS rules go here */
    /* Note: You need a separate @media screen group for other rules */
}
2. Create a specific printable page layout and use the HTML2PDF extension to print to PDF instead of printing to the printer.

Not sure which one has your preference

Remco Dekkinga wrote: How would the javascript code? I have no understanding of the language ...
Hi Philipe,

YoAs I can see it, you can do two things:
1. Add some javascript to the button that prints the page and add to the CSS exceptions with the @Media tag for the pieces you don't want to see in the printed page.
The CSS will look something like this:
@media print {
    /* Print CSS rules go here */
    /* Note: You need a separate @media screen group for other rules */
}
2. Create a specific printable page layout and use the HTML2PDF extension to print to PDF instead of printing to the printer.

Not sure which one has your preference
 
 
 
On HTML2PDF, what do I set for "ExecutablePATH" and "Proxy" I already know that the "URL" is the URL That I want to print.
Felipe Melo wrote:
Remco Dekkinga wrote: How would the javascript code? I have no understanding of the language ...
Hi Philipe,

YoAs I can see it, you can do two things:
1. Add some javascript to the button that prints the page and add to the CSS exceptions with the @Media tag for the pieces you don't want to see in the printed page.
The CSS will look something like this:
@media print {
    /* Print CSS rules go here */
    /* Note: You need a separate @media screen group for other rules */
}
2. Create a specific printable page layout and use the HTML2PDF extension to print to PDF instead of printing to the printer.

Not sure which one has your preference
 
 
 
 
You can follow the tutorial on the following page: http://www.htmlgoodies.com/beyond/javascript/article.php/3471121

It gives a nice explanation and different solutions to use the print function in javascipt.

Hope this helps.

Kind regards,

Remco
Felipe Melo wrote:
On HTML2PDF, what do I set for "ExecutablePATH" and "Proxy" I already know that the "URL" is the URL That I want to print.
On the following forum post there is a faq which might help you out. If you can't work it out from here, you might need to contact the developer of that tool. 

Kind regards,

Remco