ਵੈੱਬ ਨੂੰ ਕੈਪਚਰ ਅਤੇ ਕਨਵਰਟ ਕਰਨ ਲਈ ਟੂਲ

How to Convert a Webpage to PDF using GrabzIt's PDF APIਵੈੱਬਪੰਨਾ ਨੂੰ PDF

Often you can come across important information on the internet that you may want to save for future reference. The internet changes often, so there's no guarantee that a webpage will always be available in the future. This is where converting a webpage to a PDF comes in handy. In this article, we will discuss the various methods and tools available to convert a webpage to a PDF.

Save Lineਫਲਾਈਨ ਦੇਖਣ ਲਈ ਵੈਬਸਾਈਟ

One of the easiest ways to convert a webpage to a PDF is by using a webpage to PDF converter. GrabzIt provides a PDF converter through its Toolਨਲਾਈਨ ਟੂਲ. Simply enter the URL of the webpage you want to convert and then download the PDF file. It also offers additional features such as customizing the layout and adding watermarks.

For those with programming knowledge, you can also convert a webpage to a PDF using a programming language such as PHP. Which then calls the webpage to PDF API to allow you to generate a PDF from a URL or HTML code. This method may require more technical knowledge, but it offers more ways to tailor the PDF exactly how you want.

This comes with the added advantage of allowing you to automate the process of converting webpages into PDFs. This allows you to integrate the conversion process into your own website or application. Of course our API offer various advanced features. Such as customizing the layout, adding watermarks, and converting multiple webpages at once.

In fact GrabzIt's web page to PDF API is highly flexible. It lets you produce great, high quality, PDF files quickly and easily with all the basic features provided for free. ਅਕਾਉਂਟ ਬਣਾਓ ਸ਼ੁਰੂ ਕਰਨ ਲਈ.

To see the API in action please enter the web page URL you wish to convert into a PDF document into the demo. The completed PDF will then be automatically download when our service has finished converting the webpage.

We made it faster to create a PDF from web pages located around the world. By using our global network of servers to create a nearby web browser instance to reduce latency.

ਵੈੱਬਪੰਨਾ ਨੂੰ ਪੀਡੀਐਫ ਏਪੀਆਈ

Add GrabzIt's Webpage to PDF feature to your app using our API and one of nine supported programming languages. To begin converting pages, choose a language below to view code examples and instructions.

ਹੇਠਾਂ ਦਿੱਤਾ ਕੋਡ ਸਨਿੱਪਟ ਦਰਸਾਉਂਦਾ ਹੈ ਕਿ URL ਨੂੰ ਬਦਲਣਾ ਕਿੰਨਾ ਸੌਖਾ ਹੈ intਅਤੇ ਏਐਸਪੀ.ਨੇਟ ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਪੀਡੀਐਫ. ਸਿਰਫ ਪੀ ਡੀ ਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਬਣਾਉਣਾ ਅਰੰਭ ਕਰਨ ਲਈ ਏਐਸਪੀ.ਨੇਟ ਲਾਇਬ੍ਰੇਰੀ ਨੂੰ ਡਾਉਨਲੋਡ ਕਰੋ, ਪ੍ਰਾਪਤ ਆਪਣੇ ਕੁੰਜੀ ਅਤੇ ਗੁਪਤ ਅਤੇ ਫਿਰ ਡੈਮੋ ਦੀ ਵਰਤੋਂ ਕਰੋ ਦੇ ਅੰਦਰ ਸ਼ਾਮਲ. ਅੰਤ ਵਿੱਚ ਵੇਖੋ ASP.NET ਲਈ API ਦਸਤਾਵੇਜ਼ ਉਹਨਾਂ ਸਾਰੇ ਤਰੀਕਿਆਂ ਦਾ ਪਤਾ ਲਗਾਉਣ ਲਈ ਜੋ ਤੁਸੀਂ ਗਰੈਬਜ਼ ਆਈ ਟੀ ਏ ਦੀ ਵਰਤੋਂ ਕਰ ਸਕਦੇ ਹੋ.

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
grabzIt.URLToPDF("https://www.tesla.com"); 
grabzIt.SaveTo("documents/result.pdf");

ਹੇਠਾਂ ਦਿੱਤਾ ਕੋਡ ਸਨਿੱਪਟ ਦਰਸਾਉਂਦਾ ਹੈ ਕਿ URL ਨੂੰ ਬਦਲਣਾ ਕਿੰਨਾ ਸੌਖਾ ਹੈ intਜਾਵਾ ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਪੀਡੀਐਫ. ਸਿਰਫ ਪੀ ਡੀ ਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਬਣਾਉਣਾ ਅਰੰਭ ਕਰਨ ਲਈ ਜਾਵਾ ਲਾਇਬ੍ਰੇਰੀ ਨੂੰ ਡਾ .ਨਲੋਡ ਕਰੋ, ਪ੍ਰਾਪਤ ਆਪਣੇ ਕੁੰਜੀ ਅਤੇ ਗੁਪਤ ਅਤੇ ਫਿਰ ਡੈਮੋ ਦੀ ਵਰਤੋਂ ਕਰੋ ਦੇ ਅੰਦਰ ਸ਼ਾਮਲ. ਅੰਤ ਵਿੱਚ ਵੇਖੋ ਜਾਵਾ ਲਈ API ਦਸਤਾਵੇਜ਼ ਉਹਨਾਂ ਸਾਰੇ ਤਰੀਕਿਆਂ ਦਾ ਪਤਾ ਲਗਾਉਣ ਲਈ ਜੋ ਤੁਸੀਂ ਗਰੈਬਜ਼ ਆਈ ਟੀ ਏ ਦੀ ਵਰਤੋਂ ਕਰ ਸਕਦੇ ਹੋ.

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
grabzIt.URLToPDF("https://www.tesla.com"); 
grabzIt.SaveTo("documents/result.pdf");

The following code snippet illustrates how easy it is to convert webpages to PDF for free using JavaScript. To start creating PDF screenshots download ਗਰੈਬਜ਼ਿਟ ਦੀ ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਲਾਇਬ੍ਰੇਰੀ. ਫਿਰ ਆਪਣੇ ਪ੍ਰਾਪਤ ਕਰੋ ਕੁੰਜੀ ਅਤੇ ਗੁਪਤ, ਡੋਮੇਨ ਸ਼ਾਮਲ ਕਰੋ ਤੁਸੀਂ ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਨੂੰ ਚਾਲੂ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ ਅਤੇ ਫਿਰ ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਲਈ ਏਪੀਆਈ ਦਸਤਾਵੇਜ਼ to find out all the ways you can use GrabzIt's API. Remember to specify the PDF format.

<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@/grabzit.min.js"></script>
<script>
GrabzIt("Sign in to view your Application Key").ConvertURL("https://www.tesla.com", 
{"format":"pdf"}).Create();
</script>

ਹੇਠਾਂ ਦਿੱਤਾ ਕੋਡ ਸਨਿੱਪਟ ਦਰਸਾਉਂਦਾ ਹੈ ਕਿ URL ਨੂੰ ਬਦਲਣਾ ਕਿੰਨਾ ਸੌਖਾ ਹੈ intoa PDF Node.js. ਦੀ ਵਰਤੋਂ ਕਰਦਿਆਂ. ਸਿਰਫ ਪੀ ਡੀ ਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਬਣਾਉਣਾ ਅਰੰਭ ਕਰਨ ਲਈ Node.js ਪੈਕੇਜ ਡਾ downloadਨਲੋਡ ਕਰੋ, ਪ੍ਰਾਪਤ ਆਪਣੇ ਕੁੰਜੀ ਅਤੇ ਗੁਪਤ ਅਤੇ ਫਿਰ ਡੈਮੋ ਦੀ ਵਰਤੋਂ ਕਰੋ ਦੇ ਅੰਦਰ ਸ਼ਾਮਲ. ਅੰਤ ਵਿੱਚ ਵੇਖੋ Node.js ਲਈ ਏਪੀਆਈ ਦਸਤਾਵੇਜ਼ ਉਹਨਾਂ ਸਾਰੇ ਤਰੀਕਿਆਂ ਦਾ ਪਤਾ ਲਗਾਉਣ ਲਈ ਜੋ ਤੁਸੀਂ ਗਰੈਬਜ਼ ਆਈ ਟੀ ਏ ਦੀ ਵਰਤੋਂ ਕਰ ਸਕਦੇ ਹੋ.

var grabzit = require('grabzit');

var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");
client.url_to_pdf("https://www.tesla.com");
client.save_to("documents/result.pdf", function (error, id){
    if (error != null){
        throw error;
    }
});

ਹੇਠਾਂ ਦਿੱਤਾ ਕੋਡ ਸਨਿੱਪਟ ਦਰਸਾਉਂਦਾ ਹੈ ਕਿ URL ਨੂੰ ਬਦਲਣਾ ਕਿੰਨਾ ਸੌਖਾ ਹੈ intਓ ਪੀ ਡੀ ਪੀ ਪਰਲ ਦੀ ਵਰਤੋਂ ਕਰ ਰਿਹਾ ਹੈ. ਸਿਰਫ ਪੀ ਡੀ ਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਬਣਾਉਣਾ ਅਰੰਭ ਕਰਨ ਲਈ ਪਰਲ ਲਾਇਬ੍ਰੇਰੀ ਨੂੰ ਡਾ .ਨਲੋਡ ਕਰੋ, ਪ੍ਰਾਪਤ ਆਪਣੇ ਕੁੰਜੀ ਅਤੇ ਗੁਪਤ ਅਤੇ ਫਿਰ ਡੈਮੋ ਦੀ ਵਰਤੋਂ ਕਰੋ ਦੇ ਅੰਦਰ ਸ਼ਾਮਲ. ਅੰਤ ਵਿੱਚ ਵੇਖੋ ਪਰਲ ਲਈ ਏਪੀਆਈ ਦਸਤਾਵੇਜ਼ ਉਹਨਾਂ ਸਾਰੇ ਤਰੀਕਿਆਂ ਦਾ ਪਤਾ ਲਗਾਉਣ ਲਈ ਜੋ ਤੁਸੀਂ ਗਰੈਬਜ਼ ਆਈ ਟੀ ਏ ਦੀ ਵਰਤੋਂ ਕਰ ਸਕਦੇ ਹੋ.

#!/usr/bin/perl

use GrabzItClient;

$grabzIt = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret");
$grabzIt->URLToPDF("https://www.tesla.com");
$grabzIt->SaveTo("documents/result.pdf");

The below PHP code is an example of a PDF converter script showing how to convert an HTML page into ਪੀ ਐੱਚ ਪੀ ਦੀ ਵਰਤੋਂ ਕਰਦਿਆਂ ਪੀ ਡੀ ਐੱਫ. ਸਿਰਫ ਪੀ ਡੀ ਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਬਣਾਉਣਾ ਅਰੰਭ ਕਰਨ ਲਈ PHP ਲਾਇਬ੍ਰੇਰੀ ਨੂੰ ਡਾਉਨਲੋਡ ਕਰੋ, ਪ੍ਰਾਪਤ ਆਪਣੇ ਕੁੰਜੀ ਅਤੇ ਗੁਪਤ ਅਤੇ ਫਿਰ ਡੈਮੋ ਦੀ ਵਰਤੋਂ ਕਰੋ ਦੇ ਅੰਦਰ ਸ਼ਾਮਲ. ਅੰਤ ਵਿੱਚ ਵੇਖੋ PHP ਲਈ API ਦਸਤਾਵੇਜ਼ ਉਹਨਾਂ ਸਾਰੇ ਤਰੀਕਿਆਂ ਦਾ ਪਤਾ ਲਗਾਉਣ ਲਈ ਜੋ ਤੁਸੀਂ ਗਰੈਬਜ਼ ਆਈ ਟੀ ਏ ਦੀ ਵਰਤੋਂ ਕਰ ਸਕਦੇ ਹੋ.

include("GrabzItClient.php");

$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
$grabzIt->URLToPDF("https://www.tesla.com"); 
$grabzIt->SaveTo("documents/result.pdf");

ਹੇਠਾਂ ਦਿੱਤਾ ਕੋਡ ਸਨਿੱਪਟ ਦਰਸਾਉਂਦਾ ਹੈ ਕਿ URL ਨੂੰ ਬਦਲਣਾ ਕਿੰਨਾ ਸੌਖਾ ਹੈ intਪਾਈਥਨ ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਪੀ ਡੀ ਐਫ. ਸਿਰਫ ਪੀ ਡੀ ਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਬਣਾਉਣਾ ਅਰੰਭ ਕਰਨ ਲਈ ਪਾਈਥਨ ਲਾਇਬ੍ਰੇਰੀ ਨੂੰ ਡਾ .ਨਲੋਡ ਕਰੋ, ਪ੍ਰਾਪਤ ਆਪਣੇ ਕੁੰਜੀ ਅਤੇ ਗੁਪਤ ਅਤੇ ਫਿਰ ਡੈਮੋ ਦੀ ਵਰਤੋਂ ਕਰੋ ਦੇ ਅੰਦਰ ਸ਼ਾਮਲ. ਅੰਤ ਵਿੱਚ ਵੇਖੋ ਪਾਈਥਨ ਲਈ ਏਪੀਆਈ ਦਸਤਾਵੇਜ਼ ਉਹਨਾਂ ਸਾਰੇ ਤਰੀਕਿਆਂ ਦਾ ਪਤਾ ਲਗਾਉਣ ਲਈ ਜੋ ਤੁਸੀਂ ਗਰੈਬਜ਼ ਆਈ ਟੀ ਏ ਦੀ ਵਰਤੋਂ ਕਰ ਸਕਦੇ ਹੋ.

from GrabzIt import GrabzItClient

grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret")
grabzIt.URLToPDF("https://www.tesla.com") 
grabzIt.SaveTo("documents/result.pdf") 

This code shows how simple it is to change a URL intਓ ਪੀ ਡੀ ਐਫ ਗਰੈਬਜ਼ ਆਈ ਟੀ ਦੇ ਰੈਸਟਫਲ ਏਪੀਆਈ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹੋਏ. The API ਦਸਤਾਵੇਜ਼ ਇਸ ਵਿੱਚ ਹੋਰ ਵੀ waysੰਗ ਹਨ ਜੋ ਤੁਸੀਂ ਆਪਣੇ ਕੈਪਚਰ ਨੂੰ ਅਨੁਕੂਲਿਤ ਕਰ ਸਕਦੇ ਹੋ.

https://api.grabz.it/services/convert?key=Sign in to view your Application Key&format=pdf&url=https%3A%2F%2Fwww.tesla.com%2F
	

ਹੇਠਾਂ ਦਿੱਤਾ ਕੋਡ ਸਨਿੱਪਟ ਦਰਸਾਉਂਦਾ ਹੈ ਕਿ URL ਨੂੰ ਬਦਲਣਾ ਕਿੰਨਾ ਸੌਖਾ ਹੈ intਓ ਪੀ ਡੀ ਪੀ ਰੂਬੀ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹੋਏ. ਸਿਰਫ ਪੀ ਡੀ ਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਬਣਾਉਣਾ ਅਰੰਭ ਕਰਨ ਲਈ ਰੂਬੀ ਰਤਨ ਨੂੰ ਡਾ .ਨਲੋਡ ਕਰੋ, ਪ੍ਰਾਪਤ ਆਪਣੇ ਕੁੰਜੀ ਅਤੇ ਗੁਪਤ ਅਤੇ ਫਿਰ ਡੈਮੋ ਦੀ ਵਰਤੋਂ ਕਰੋ ਦੇ ਅੰਦਰ ਸ਼ਾਮਲ. ਅੰਤ ਵਿੱਚ ਵੇਖੋ ਰੂਬੀ ਲਈ ਏਪੀਆਈ ਦਸਤਾਵੇਜ਼ ਉਹਨਾਂ ਸਾਰੇ ਤਰੀਕਿਆਂ ਦਾ ਪਤਾ ਲਗਾਉਣ ਲਈ ਜੋ ਤੁਸੀਂ ਗਰੈਬਜ਼ ਆਈ ਟੀ ਏ ਦੀ ਵਰਤੋਂ ਕਰ ਸਕਦੇ ਹੋ.

require 'grabzit'

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")
grabzItClient.url_to_pdf("https://www.tesla.com")	
grabzItClient.save_to("documents/result.pdf") 	

You can further customize your converted files using ਖਾਕੇ. ਇਹ ਤੁਹਾਡੇ ਦੁਆਰਾ ਤਿਆਰ ਕੀਤੇ ਕਿਸੇ ਵੀ PDF ਦਸਤਾਵੇਜ਼ ਲਈ ਬਹੁਤ ਜ਼ਿਆਦਾ ਲਚਕਦਾਰ ਸਿਰਲੇਖ ਅਤੇ ਫੁੱਟਰ ਬਣਾਉਣ ਦੀ ਆਗਿਆ ਦਿੰਦੇ ਹਨ.

Save ਵੈੱਬਪੰਨਾ PDF ਦੇ ਤੌਰ ਤੇ

If you have a website, CMS, or blog, you can let users save the current webpage as a PDF. You can do this by clicking on a link or button, by adding the Save ਜਿਵੇਂ ਕਿ ਪੀਡੀਐਫ ਪਲੱਗਇਨ ਤੁਹਾਡੀ ਵੈਬਸਾਈਟ 'ਤੇ. ਇਹ ਪਲੱਗਇਨ ਗੂਗਲ ਕਰੋਮ ਅਤੇ ਸਮੇਤ ਸਾਰੇ ਬ੍ਰਾsersਜ਼ਰਾਂ ਨਾਲ ਅਨੁਕੂਲ ਹੈ Intਅਰਨੇਟ ਐਕਸਪਲੋਰਰ.

ਵੈੱਬ ਨੂੰ PDF ਵਿੱਚ ਤਬਦੀਲ ਕਰਨ ਦੇ ਹੋਰ ਤਰੀਕੇ

Instead of converting one webpage, you can convert a whole website to PDF using a special ਵੈਬ ਸਕ੍ਰੈਪਰ ਟੈਂਪਲੇਟ. This template will instruct the web scraper to follow all the links on the entire website. The system converts every discovered link to PDF.

You are not limited to just converting URLs. To convert HTML or a saved webpage to PDF, you can use our HTML ਨੂੰ ਸਿੱਧਾ ਰੂਪਾਂਤਰਿਤ ਕਰਨ ਲਈ ਏ.ਪੀ.ਆਈ. into ਪੀਡੀਐਫ ਫਾਈਲ.