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 Html2Canvas. Html2Canvas 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.
Step 3:- Now Create a javascript function in Function and Global Variable Declaration Section below code and screenshot will help you.
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
True Action Identification:-Execute Javascript Code
screenshot(); //call Javascript Fucntion
If You Like This Tutorial Please Like Share And Comment.
0 Comments
If you have any doubts, Please let me know