Display Pdf file on web page

In this article, I’ll explain different ways to embed Pdf files in your web application. Method 1: Using the <embed> tag Let’s start with the tag and that is the easiest way to display PDF in browser. This tag allows you to embed the PDF directly within your HTML page. Example: <embed src=”yourfile.pdf” width=”600″ height=”400″ … Read more

How to Read Text from Image in PHP

If you want to read/extract all the text from an image or scanned documents in Php then OCR is used for it. OCR (Optical Character Recognition) is used for any form of image based data extraction. In this article I’ll explain how to read text from an image using OCR. I’ll use “Tesseract” OCR for … Read more

PHP Serialize and Unserialize Arrays

In this post I’ll explain how to easily transfer/convert Arrays into a format that can easily be stored. We use serialize() and unserialize() functions of Php for this purpose. These functions allow you to convert arrays into string format and then you can later retrieve them as required. Serialization: Serialization is a process in which … Read more

Export Data to CSV in PHP

CSV (Comma Separated Values) is a simple text file format that uses commas to separate values. It is a very common requirement in many web applications these days to export the data into a CSV file. In this post, I’ll explain how to easily export data to a CSV file using PHP. Simple PHP CSV … Read more

Detect Key Press in JavaScript

Detecting key press in javascript can be a very useful feature as it enhances user’s interaction with the web applications. This article explains how can you do it: Keydown Event The keydown event is triggered when user presses down a key. For example: // Detect key press using keydown event document.addEventListener(‘keydown’, function(event) { console.log(‘Key pressed: … Read more

How to play and pause a video using Jquery

In this article, I’ll explain how to use jQuery to play and pause an Html video element. It is pretty easy and with just a few lines of code you can achieve this functionality. This will allow you to add custom buttons that can control the playing state of the video. HTML Structure First, we’ll … Read more

PHP Array to JSON and JSON to Array

In this article, I’ll explain how to convert a PHP array into a JSON string and similarly how to convert a JSON string back into PHP array. I’ll use built in Php functions for this purpose. Convert PHP Array to JSON To convert array into a JSON string, we use the Php json_encode() function as … Read more

How to Print to Console in Javascript

In this topic, I’ll cover a very common practice that is useful while developing web applications in Javascript to be able to inspect or debug code. The most common way to print information to the console is by using the console.log() method. This will print the message to the browser’s console. Basic Example console.log(‘Hello world!’); … Read more

Text to Speech in JavaScript

Today I’ll explain how to use Web Speech API(SpeechRecognition) in javascript to convert text to speech. Web speech Api allows you to add voice in your web applications. It is pretty simple to use. Here is a simple example showing how you can use the Web Speech API to convert text into speech using JavaScript. … Read more

How to Disable Dates in jQuery Datepicker

The jQuery Datepicker is a versatile tool that allows you to disable specific dates, ranges of dates, or even weekdays to prevent users from selecting them. This feature can be useful for various applications, such as booking systems or event scheduling. In this tutorial, we will learn how to disable dates in the jQuery Datepicker. … Read more