أدوات لالتقاط وتحويل الويب

كيفية إضافة الإشارات المرجعية أو الخطوط العريضة لمستندات PDF؟

يتم تحميل عنصر على صفحة ويب بعد المحتوى الرئيسي

يمكن لـ GrabzIt إضافة إشارات مرجعية تلقائيًا إلى مستند PDF باستخدام أداة التخطيط التفصيلي المدمجة في PDF، والتي تكرر جدول محتويات الوظائف.

للقيام بذلك، حدد معلمة التضمين التفصيلي كما هو موضح أدناه. سيتم بعد ذلك إنشاء المخطط التفصيلي تلقائيًا عن طريق تحليل HTML لصفحة الويب لعناصر H2 وH3 لإنشاء إشارات مرجعية مع نص هذه العناصر المستخدمة لأسماء الإشارات المرجعية، بالإضافة إلى ذلك سيتم دمج عناصر H3 تلقائيًا ضمن عناصر H2 في قائمة الإشارات المرجعية.

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
PDFOptions options = new PDFOptions();
options.IncludeOutline = true;
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.setIncludeOutline(true);
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, "includeoutline": 1}).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 = {"includeOutline":true};
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->includeOutline(1);
$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->setIncludeOutline(true);
$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.includeOutline = true
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&includeoutline=1&format=pdf&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.includeOutline = true
grabzIt.url_to_pdf("http://www.spacex.com", options)
grabzIt.save("http://www.mywebsite.com/handler/index")

تخصيص الإشارات المرجعية والمخططات التفصيلية

يمكن تخصيص الإشارات المرجعية عن طريق تغيير HTML الذي سيتم تحويله إلى PDF. يمكن إضافة إشارة مرجعية H2 إلى أي عنصر عن طريق إعطائها GrabzItBookmarkH2 فئة CSS، وبالمثل يمكن إضافة إشارة مرجعية H3 إلى عنصر عن طريق تعيينه GrabzItBookmarkH3 فئة CSS. إذا كنت تريد استبعاد عنصر HTML من استخدامه كإشارة مرجعية، فيمكنك تعيين GrabzItBookmarkExclude فئة إلى العنصر. يظهر مثال لاستخدام فئات CSS الخاصة لتخصيص الإشارات المرجعية في HTML أدناه.

<html>
	<body>
		<h2 class="GrabzItBookmarkExclude">My Article</h2>
		<p>Ignorant branched humanity led now marianne too strongly entrance.</p>
		<span class="GrabzItBookmarkH2">Start here</span>
		<p>Rose to shew bore no ye of paid rent form.</p>
		<span class="GrabzItBookmarkH3">Then read this</span>
		<p>She which are maids boy sense her shade.</p>
	</body>
</html>