Manchmal möchten Sie, dass der Inhalt eines Dokuments nur für diejenigen sichtbar ist, die dazu berechtigt sind. Dies kann dadurch erfolgen, dass einem Dokument ein Passwort zugewiesen wird, das zum Öffnen des Dokuments korrekt eingegeben werden muss. Sie können ein PDF- oder Word-Dokument zum Zeitpunkt seiner Erstellung mit einem Passwort schützen, indem Sie GrabzIt das Passwort geben, das Sie verwenden möchten.
Die folgenden Beispiele zeigen, wie Sie einem PDF-Dokument für jede derzeit unterstützte Programmiersprache einen Passwortschutz hinzufügen.
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); PDFOptions options = new PDFOptions(); options.Password = "pass"; grabzIt.URLToPDF("http://www.spacex.com", options); grabzIt.Save("http://www.mywebsite.com/Home/Handler");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); PDFOptions options = new PDFOptions(); options.setPassword("pass"); grabzIt.URLToPDF("http://www.spacex.com", options); grabzIt.Save("http://www.mywebsite.com/handler");
<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@3.5.2/grabzit.min.js"></script>
<script>
GrabzIt("Sign in to view your Application Key").ConvertURL("http://www.spacex.com",
{"format": "pdf", "download": 1, "password": "pass"}).Create();
</script>
var grabzit = require('grabzit'); var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret"); var options = {"password":"pass"}; client.url_to_pdf("http://www.spacex.com", options); client.save("http://www.example.com/handler", function (error, id){ if (error != null){ throw error; } });
$grabzIt = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret"); $options = GrabzItPDFOptions->new(); $options->password("pass"); $grabzIt->URLToPDF("http://www.spacex.com", $options); $grabzIt->Save("http://www.mywebsite.com/handler.pl");
$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); $options = new \GrabzIt\GrabzItPDFOptions(); $options->setPassword("pass"); $grabzIt->URLToPDF("http://www.spacex.com", $options); $grabzIt->Save("http://www.mywebsite.com/handler.php");
grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret") options = GrabzItPDFOptions.GrabzItPDFOptions() options.password = "pass" grabzIt.URLToPDF("http://www.spacex.com", options) grabzIt.Save("http://www.mywebsite.com/handler.py")
https://api.grabz.it/services/convert?key=Sign in to view your Application Key&format=pdf&password=pass&url=https%3A%2F%2Fspacex.com%2F
grabzIt = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret") options = GrabzIt::PDFOptions.new() options.password = "pass" grabzIt.url_to_pdf("http://www.spacex.com", options) grabzIt.save("http://www.mywebsite.com/handler/index")
Die folgenden Beispiele zeigen, wie Sie einer DOCX-Datei für jede derzeit unterstützte Programmiersprache einen Passwortschutz hinzufügen.
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); DOCXOptions options = new DOCXOptions(); options.Password = "pass"; grabzIt.URLToDOCX("http://www.spacex.com", options); grabzIt.Save("http://www.mywebsite.com/Home/Handler");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); DOCXOptions options = new DOCXOptions(); options.setPassword("pass"); grabzIt.URLToDOCX("http://www.spacex.com", options); grabzIt.Save("http://www.mywebsite.com/handler");
<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@3.5.2/grabzit.min.js"></script>
<script>
GrabzIt("Sign in to view your Application Key").ConvertURL("http://www.spacex.com",
{"format": "docx", "download": 1, "password": "pass"}).Create();
</script>
var grabzit = require('grabzit'); var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret"); var options = {"password":"pass"}; client.url_to_docx("http://www.spacex.com", options); client.save("http://www.example.com/handler", function (error, id){ if (error != null){ throw error; } });
$grabzIt = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret"); $options = GrabzItDOCXOptions->new(); $options->password("pass"); $grabzIt->URLToDOCX("http://www.spacex.com", $options); $grabzIt->Save("http://www.mywebsite.com/handler.pl");
$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); $options = new \GrabzIt\GrabzItDOCXOptions(); $options->setPassword("pass"); $grabzIt->URLToDOCX("http://www.spacex.com", $options); $grabzIt->Save("http://www.mywebsite.com/handler.php");
grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret") options = GrabzItDOCXOptions.GrabzItDOCXOptions() options.password = "pass" grabzIt.URLToDOCX("http://www.spacex.com", options) grabzIt.Save("http://www.mywebsite.com/handler.py")
https://api.grabz.it/services/convert?key=Sign in to view your Application Key&format=docx&password=pass&url=https%3A%2F%2Fspacex.com%2F
grabzIt = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret") options = GrabzIt::DOCXOptions.new() options.password = "pass" grabzIt.url_to_docx("http://www.spacex.com", options) grabzIt.save("http://www.mywebsite.com/handler/index")