웹 캡처 및 변환 도구

웹 페이지를 변환하기 전에 어떻게 변경합니까?

웹페이지 변경

페이지를 이미지, PDF 또는 DOCX로 캡처하기 전에 모든 페이지의 HTML을 변경할 수 있습니다.

이렇게 하려면 사용 중인 프로그래밍 언어의 적절한 방법을 사용하여 HTML 페이지의 내용을 읽어야 합니다. 이 작업을 완료하면 HTML을 변경합니다. 그 예는 아래에 나와 있습니다. 그런 다음 주소 매개변수를 콘텐츠를 읽는 데 사용된 것과 동일한 매개변수로 설정합니다. 이렇게 하면 웹 페이지가 동일한 URL을 사용하여 캡처되므로 모든 관련 리소스가 올바르게 렌더링됩니다.

string html = ""; //populate this variable by the HTML from http://www.example.com/index.html
//alter HTML
html += "<style>body{background-color:red !important;}</style>";
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
ImageOptions options = new ImageOptions();
options.Address = "http://www.example.com/index.html";
grabzIt.HTMLToImage(html, options);
grabzIt.SaveTo("result.jpg");
String html = ""; //populate this variable by the HTML from http://www.example.com/index.html
//alter HTML
html += "<style>body{background-color:red !important;}</style>";
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
ImageOptions options = new ImageOptions();
options.setAddress("http://www.example.com/index.html");
grabzIt.HTMLToImage(html, options);
grabzIt.SaveTo("result.jpg");
var grabzit = require('grabzit');

var html = ""; //populate this variable by the HTML from http://www.example.com/index.html
//alter HTML
html += "<style>body{background-color:red !important;}</style>";
var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");
client.html_to_image(html,{"address":"http://www.example.com/index.html"});
client.save_to("result.jpg", function (error, id){
    if (error != null){
        throw error;
    }
});
$html = ""; #populate this variable by the HTML from http://www.example.com/index.html			
#alter HTML
html .= "<style>body{background-color:red !important;}</style>";
$grabzIt = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret");
$options = GrabzItImageOptions->new();
$options->address("http://www.example.com/index.html");
$grabzIt->HTMLToImage($html,$options);
$grabzIt->SaveTo("result.jpg");
$html = ""; //populate this variable by the HTML from http://www.example.com/index.html	
//alter HTML
$html .= "<style>body{background-color:red !important;}</style>";
$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
$options = new \GrabzIt\GrabzItImageOptions();
$options->setAddress("http://www.example.com/index.html");
$grabzIt->HTMLToImage($html, $options);
$grabzIt->SaveTo("result.jpg");
html = "" #populate this variable by the HTML from http://www.example.com/index.html	
#alter HTML
html += "<style>body{background-color:red !important;}</style>"
grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret")
options = GrabzItImageOptions.GrabzItImageOptions()
options.address = "http://www.example.com/index.html"
grabzIt.HTMLToImage(html, options)
grabzIt.SaveTo("result.jpg")
html = "" #populate this variable by the HTML from http://www.example.com/index.html
#alter HTML
html += "<style>body{background-color:red !important;}</style>";
grabzIt = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")
options = GrabzIt::ImageOptions.new()
options.address = "http://www.example.com/index.html"
grabzIt.html_to_image(html, options)
grabzIt.save_to("result.jpg")