Ticker

6/recent/ticker-posts

How to Take a Full Page Screenshot in Oracle Apex - Javainhand Tutorial

How to take a full page screenshot in Oracle Apex

Hello Friends,
In this Oracle APEX Tutorial, I will explain to you How to take a full-page screenshot in Oracle Apex.

I have received an email from my subscriber for the implementation of taking a screenshot for the whole page through a button click and save into the local system.

In this implementation, I am using a third-party library Html2CanvasHtml2Canvas is a javascript library that is used for taking a screenshot of the whole page or specific area.

Let's Start to follow below steps:-

Step 1:- Download the Html2Canvas library.

Step 2:- After Downloading library upload into your application and include in javascript File URLs Section or you can use direct URL. The below screenshot will help you out.


How to take a full page screenshot in Oracle Apex

Step 3:- Now Create a javascript function in Function and Global Variable Declaration Section below code and screenshot will help you.

How to take a full page screenshot in Oracle Apex


function screenshot(){
html2canvas(document.body).then(function(canvas) {
var a = document.createElement('a');
a.href = canvas.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream");
a.download = 'image.jpg';
a.click();
});
}  

Step 4:- Now Right-click on the button create a Click Dynamic Action Event.

Identification:- Take Screenshot
Event:-Click
Selection Type:-Button
Button:-screen_shot

How to take a full page screenshot in Oracle Apex

True Action Identification:-Execute Javascript Code
screenshot();  //call Javascript Fucntion

How to take a full page screenshot in Oracle Apex

If You Like This Tutorial Please Like Share And Comment.

Post a comment

0 Comments