כלים ללכידה ולהמרה של האינטרנט

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 אתר לצפייה במצב לא מקוון

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 כלי מקוון. 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 intלבלוט את תהליך ההמרה 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. צור חשבון להתחיל.

כדי לראות את ה-API בפעולה, הזן את כתובת האתר של דף האינטרנט שברצונך להמיר 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.

דף אינטרנט ל- API של PDF

הוסף את תכונת דף האינטרנט של GrabzIt ל-PDF לאפליקציה שלך באמצעות ה-API שלנו ואחת מתשע שפות תכנות נתמכות. כדי להתחיל להמיר דפים, בחר שפה למטה כדי להציג דוגמאות קוד והוראות.

קטע הקוד הבא ממחיש עד כמה קל להמיר כתובת URL intoa PDF באמצעות ASP.NET. כדי להתחיל ליצור צילומי מסך של PDF בלבד הורד את ספריית ASP.NET, קבל את שלך מפתח וסוד ולאחר מכן השתמש בהדגמה הכלול בתוך. לבסוף בדוק את תיעוד API עבור ASP.NET כדי לגלות את כל הדרכים בהן אתה יכול להשתמש בממשק ה- API של GrabzIt.

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 intoa PDF באמצעות Java. כדי להתחיל ליצור צילומי מסך של PDF בלבד הורד את ספריית Java, קבל את שלך מפתח וסוד ולאחר מכן השתמש בהדגמה הכלול בתוך. לבסוף בדוק את תיעוד API ל- Java כדי לגלות את כל הדרכים בהן אתה יכול להשתמש בממשק ה- API של GrabzIt.

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");

קטע הקוד הבא ממחיש כמה קל להמיר דפי אינטרנט ל-PDF בחינם באמצעות JavaScript. כדי להתחיל ליצור צילומי מסך PDF הורד ספריית JavaScript של GrabzIt. ואז קבל את שלך מפתח וסוד, הוסף את הדומיין אתה רוצה להשתמש ב- JavaScript ואז לבדוק את תיעוד API ל- JavaScript כדי לגלות את כל הדרכים שבהן אתה יכול להשתמש ב-API של GrabzIt. זכור לציין את פורמט ה-PDF.

<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. כדי להתחיל ליצור צילומי מסך של PDF בלבד הורד את חבילת Node.js, קבל את שלך מפתח וסוד ולאחר מכן השתמש בהדגמה הכלול בתוך. לבסוף בדוק את תיעוד API עבור Node.js כדי לגלות את כל הדרכים בהן אתה יכול להשתמש בממשק ה- API של GrabzIt.

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 intoa PDF באמצעות פרל. כדי להתחיל ליצור צילומי מסך של PDF בלבד הורד את ספריית פרל, קבל את שלך מפתח וסוד ולאחר מכן השתמש בהדגמה הכלול בתוך. לבסוף בדוק את תיעוד API לפרל כדי לגלות את כל הדרכים בהן אתה יכול להשתמש בממשק ה- API של GrabzIt.

#!/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 PDF באמצעות PHP. כדי להתחיל ליצור צילומי מסך של PDF בלבד הורד את ספריית PHP, קבל את שלך מפתח וסוד ולאחר מכן השתמש בהדגמה הכלול בתוך. לבסוף בדוק את תיעוד API עבור PHP כדי לגלות את כל הדרכים בהן אתה יכול להשתמש בממשק ה- API של GrabzIt.

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 intoa PDF באמצעות Python. כדי להתחיל ליצור צילומי מסך של PDF בלבד הורד את ספריית פייתון, קבל את שלך מפתח וסוד ולאחר מכן השתמש בהדגמה הכלול בתוך. לבסוף בדוק את תיעוד API לפיתון כדי לגלות את כל הדרכים בהן אתה יכול להשתמש בממשק ה- API של GrabzIt.

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") 

קוד זה מראה כמה פשוט לשנות כתובת URL intoa PDF באמצעות ממשק ה- API RESTful של GrabzIt. ה תיעוד API מכיל דרכים רבות אף יותר להתאמה אישית של הצילומים שלך.

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 intoa PDF באמצעות רובי. כדי להתחיל ליצור צילומי מסך של PDF בלבד הורד את אבן הרובי, קבל את שלך מפתח וסוד ולאחר מכן השתמש בהדגמה הכלול בתוך. לבסוף בדוק את תיעוד API לרובי כדי לגלות את כל הדרכים בהן אתה יכול להשתמש בממשק ה- API של GrabzIt.

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") 	

אתה יכול להתאים אישית יותר את הקבצים שהומרו באמצעות תבניות. אלה מאפשרים לך ליצור כותרות עליונות רגליים תחתונות וגמישות ביותר עבור כל אחד ממסמכי ה- PDF שאתה מייצר.

Save דף אינטרנט כ- PDF

אם יש לך אתר אינטרנט, CMS או בלוג, אתה יכול לאפשר למשתמשים save דף האינטרנט הנוכחי כקובץ PDF. אתה יכול לעשות זאת על ידי לחיצה על קישור או כפתור, על ידי הוספת ה Save כתוסף PDF לאתר שלך. תוסף זה תואם את כל הדפדפנים כולל Google Chrome ו- Intארנט סייר.

דרכים אחרות להמיר את האינטרנט ל- PDF

במקום להמיר דף אינטרנט אחד, אתה יכול להמיר שלם אתר ל-PDF באמצעות מיוחד תבנית מגרד אינטרנט. תבנית זו תנחה את מגרד האינטרנט לעקוב אחר כל הקישורים באתר כולו. המערכת ממירה כל קישור שהתגלה ל-PDF.

You are not limited to just converting URLs. To convert HTML or a saved webpage to PDF, you can use our API להמרה ישירות של HTML into PDF קובץ.