捕獲和轉換Web的工具
整頁截圖

使用GrabzIt創建完整的屏幕截圖

In today's digital age, screenshots have become an essential tool for communication and documentation! Whether you're trying to show a friend a funny meme or capture important information for work. Screenshots are a quick and easy way to share information.

However, sometimes a regular screenshot just won't cut it. That's where full page screenshots come in. In this article, we'll discuss how to capture full size screenshots with GrabzIt's API and Online Tools.

A full page screenshot, also called a scrolling screenshot, captures the whole webpage or document in one image. This means screenshots capture the full web page and have the same height and width as the web page that is being screenshot. The image to the right shows a scaled example of a full length screenshot.

It can sometimes be critical to capture text and images that extend beyond your visible screen! For instance full page screenshots are especially helpful for web designers, developers, and content creators. Who need to capture the entire layout of a webpage.

So how to screenshot an entire webpage? The first option is to capture a full size screenshot 在線截圖工具 by selecting the full length option. The Online Screenshot Tool can also create screenshots with the exact size of the browser by selecting the Full Width and Full Height options. Another option is to int編寫完整的屏幕截圖 into通過使用API​​,如下所述。

使用我們的API的全屏截圖

Add the ability to create a full page screen capture in your application with GrabzIt's Screenshot API. Our API currently supports nine different programming languages.

First, choose your preferred language from the options below. Then read the sample code and instructions. The below examples creates an image with the same size as the websites height and width.

Select your preferred language from the options below to access sample code and instructions for beginning. The below examples creates an image the same size as the websites height and width.

The example code below demonstrates how easy it is to create a full page screenshot using ASP.NET. To start capturing full webpages just 下載ASP.NET庫, 拿你的 應用程序密鑰和秘密 進而 使用演示 包含在其中。 然後檢查 ASP.NET的屏幕快照API文檔 了解使用 GrabzIt API 的所有方法。

ImageOptions options = new ImageOptions();
options.BrowserHeight = -1;
options.Width = -1;
options.Height = -1;

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", 
    "Sign in to view your Application Secret");
grabzIt.URLToImage("https://www.tesla.com", options); 
grabzIt.SaveTo("images/result.jpg");

The example code below demonstrates how easy it is to create a full size screenshot using Java. To start capturing full webpages just 下載Java庫, 拿你的 應用程序密鑰和秘密 進而 使用演示 包含在其中。 然後檢查 Java的屏幕快照API文檔 了解使用 GrabzIt API 的所有方法。

ImageOptions options = new ImageOptions();
options.setBrowserHeight(-1);
options.setWidth(-1);
options.setHeight(-1);

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key",
    "Sign in to view your Application Secret");
grabzIt.URLToImage("https://www.tesla.com", options); 
grabzIt.SaveTo("images/result.jpg");

The example code below demonstrates how easy it is to create a full length screenshot using JavaScript. To start capturing full webpages download GrabzIt的JavaScript庫。 然後得到你的 應用程序密鑰和秘密, 添加域 您要使用JavaScript,然後簽出 JavaScript的屏幕快照API文檔 了解使用 GrabzIt API 的所有方法。

<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@<%= APIVersion.JavaScript %>/grabzit.min.js"></script>
<script>
GrabzIt("Sign in to view your Application Key").ConvertURL("https://www.tesla.com", 
{"bheight":-1,"width":-1,"height":-1}).Create();
</script>

The example code below demonstrates how easy it is to create a full page screenshot using Node.js. To start capturing full webpages just 下載Node.js程序包, 拿你的 應用程序密鑰和秘密 進而 使用演示 包含在其中。 然後檢查 Node.js的屏幕快照API文檔 了解使用 GrabzIt API 的所有方法。

var grabzit = require('grabzit');

var options = {"width":-1, "height":-1, "browserHeight":-1};

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

The example code below demonstrates how easy it is to create a full size screenshot using Perl. To start capturing full webpages just 下載Perl庫, 拿你的 應用程序密鑰和秘密 進而 使用演示 包含在其中。 然後檢查 Perl的屏幕快照API文檔 了解使用 GrabzIt API 的所有方法。

#!/usr/bin/perl

use GrabzItClient;

$options = GrabzItImageOptions->new();
$options->browserHeight(-1);
$options->width(-1);
$options->height(-1);

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

The example code below demonstrates how easy it is to create a full length screenshot using PHP. To start capturing full webpages just 下載PHP庫, 拿你的 應用程序密鑰和秘密 進而 使用演示 包含在其中。 然後檢查 屏幕快照API文檔,用於PHP 了解使用 GrabzIt API 的所有方法。

include("GrabzItClient.php");

$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

$options = new \GrabzIt\GrabzItImageOptions();
$options->setWidth(-1);
$options->setHeight(-1);
$options->setBrowserHeight(-1);

$grabzIt->URLToImage("https://www.tesla.com", $options); 
$grabzIt->SaveTo("images/result.jpg");

The example code below demonstrates how easy it is to create a full page screenshot using Python. To start capturing full webpages just 下載Python庫, 拿你的 應用程序密鑰和秘密 進而 使用演示 包含在其中。 然後檢查 Python的屏幕快照API文檔 了解使用 GrabzIt API 的所有方法。

from GrabzIt import GrabzItClient
from GrabzIt import GrabzItImageOptions

options = GrabzItImageOptions.GrabzItImageOptions()
options.width = -1
options.height = -1
options.browserHeight = -1

grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key",
    "Sign in to view your Application Secret")
grabzIt.URLToImage("https://www.tesla.com", options) 
grabzIt.SaveTo("images/result.jpg") 

The example code below demonstrates how easy it is to create a full size screenshot using our REST API. Also check out the RESTful屏幕截圖API文檔 to discover all the ways you can use customize your captures.

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

The example code below demonstrates how easy it is to create a full length screenshot using Ruby. To start capturing full webpages just 下載Ruby Gem, 拿你的 應用程序密鑰和秘密 進而 使用演示 包含在其中。 然後檢查 Ruby的屏幕快照API文檔 了解使用 GrabzIt API 的所有方法。

require 'grabzit'

options = GrabzIt::ImageOptions.new()
options.browserHeight = -1
options.width = -1
options.height = -1

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", 
    "Sign in to view your Application Secret")
grabzItClient.url_to_image("https://www.tesla.com", options)	
grabzItClient.save_to("images/result.jpg")