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

دمج العديد من صفحات الويب أو HTML intيا قوات الدفاع الشعبي أو DOCXدمج ملفات PDF أو DOCX

اي تم إنشاء PDF باستخدام واجهة برمجة التطبيقات يمكن بسهولة دمجها معا intيا مجتمعة قوات الدفاع الشعبي. أيضا مستندات Word تم إنشاؤها باستخدام API الخاص بنا يمكن أيضا دمجها معا into مستند DOCX واحد ، وهو مفيد إذا كنت تريد إنشاء مستند نوع كتاب. لكن بالطبع لا يمكنك دمج مستندات PDF و DOCX معًا!

لدمج مستند ، فقط مرر معرّف المستند الذي تريد دمج مستند به في mergeid المعلمة ، سيتم إلحاق المستند الجديد بالمستند الحالي. يتم إرجاع معرّف المستند عند إنشائه عن طريق الاتصال بـ save طريقة API.

دمج مجموعة من ملفات PDF

توضح الأمثلة التالية كيفية تحويل ثلاث صفحات ويب into ثلاثة مستندات PDF منفصلة ، قبل دمجها intيا واحد.

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
PDFOptions options = new PDFOptions();
grabzIt.URLToPDF("http://www.example.com/page1.html"); 
options.MergeId = grabzIt.Save();
grabzIt.URLToPDF("http://www.example.com/page2.html", options); 
options.MergeId = grabzIt.Save();
grabzIt.URLToPDF("http://www.example.com/page3.html", options); 
grabzIt.SaveTo("documents/result.pdf");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
PDFOptions options = new PDFOptions();
grabzIt.URLToPDF("http://www.example.com/page1.html"); 
options.setMergeId(grabzIt.Save());
grabzIt.URLToPDF("http://www.example.com/page2.html", options); 
options.setMergeId(grabzIt.Save());
grabzIt.URLToPDF("http://www.example.com/page3.html", options); 
grabzIt.SaveTo("documents/result.pdf");
<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.example.com/page1.html",
{"format": "pdf", "onfinish": function(id){
    GrabzIt("Sign in to view your Application Key").ConvertURL("http://www.example.com/page2.html",
    {"mergeid": id, "format": "pdf", "onfinish": function(id){
        GrabzIt("Sign in to view your Application Key").ConvertURL("http://www.example.com/page3.html",
        {"mergeid": id, "format": "pdf"}).Create();
    }}).CreateInvisible();
}}).CreateInvisible ();
</script>
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("http://www.example.com/page1.html");
client.save(null, function (err, id){
    if (err != null){
        throw err;
    }
    client.url_to_pdf("http://www.example.com/page2.html",{"mergeId":id});
    client.save(null, function (err, id){
        if (err != null){
            throw err;
        }
        client.url_to_pdf("http://www.example.com/page3.html",{"mergeId":id});
        client.save_to("documents/result.pdf")
    });
});
#!/usr/bin/perl

use GrabzItClient;

$grabzIt = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret");
$options = GrabzItPDFOptions->new();
$grabzIt->URLToPDF("http://www.example.com/page1.html");
$options->mergeId($grabzIt->Save());
$grabzIt->URLToPDF("http://www.example.com/page2.html", $options);
$options->mergeId($grabzIt->Save());
$grabzIt->URLToPDF("http://www.example.com/page3.html", $options);
$grabzIt->SaveTo("documents/result.pdf");
include("GrabzItClient.php");

$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
$options = new \GrabzIt\GrabzItPDFOptions();
$grabzIt->URLToPDF("http://www.example.com/page1.html");
$options->setMergeId($grabzIt->Save());
$grabzIt->URLToPDF("http://www.example.com/page2.html", $options);
$options->setMergeId($grabzIt->Save());
$grabzIt->URLToPDF("http://www.example.com/page3.html", $options);
$grabzIt->SaveTo("documents/result.pdf");
from GrabzIt import GrabzItClient
from GrabzIt import GrabzItPDFOptions

grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret")
options = GrabzItPDFOptions.GrabzItPDFOptions()
grabzIt.URLToPDF("http://www.example.com/page1.html") 
options.mergeId = grabzIt.Save()
grabzIt.URLToPDF("http://www.example.com/page2.html", options) 
options.mergeId = grabzIt.Save() 
grabzIt.URLToPDF("http://www.example.com/page3.html", options) 
grabzIt.SaveTo("documents/result.pdf") 
require 'grabzit'

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")
options = GrabzIt::PDFOptions.new()
grabzItClient.url_to_pdf("http://www.example.com/page1.html")	
options.mergeId = grabzItClient.save() 	
grabzItClient.url_to_pdf("http://www.example.com/page2.html", options)	
options.mergeId = grabzItClient.save() 
grabzItClient.url_to_pdf("http://www.example.com/page3.html", options)	
grabzItClient.save_to("documents/result.pdf") 

دمج مجموعة من مستندات Word

توضح الأمثلة التالية كيفية تحويل ثلاث صفحات ويب into ثلاثة مستندات Word منفصلة ، قبل دمجها intيا وثيقة DOCX واحدة.

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
DOCXOptions options = new DOCXOptions();
grabzIt.URLToDOCX("http://www.example.com/page1.html"); 
options.MergeId = grabzIt.Save();
grabzIt.URLToDOCX("http://www.example.com/page2.html", options); 
options.MergeId = grabzIt.Save();
grabzIt.URLToDOCX("http://www.example.com/page3.html", options); 
grabzIt.SaveTo("documents/result.docx");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
DOCXOptions options = new DOCXOptions();
grabzIt.URLToDOCX("http://www.example.com/page1.html"); 
options.setMergeId(grabzIt.Save());
grabzIt.URLToDOCX("http://www.example.com/page2.html", options); 
options.setMergeId(grabzIt.Save());
grabzIt.URLToDOCX("http://www.example.com/page3.html", options); 
grabzIt.SaveTo("documents/result.docx");
<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.example.com/page1.html",
{"format": "docx", "onfinish": function(id){
    GrabzIt("Sign in to view your Application Key").ConvertURL("http://www.example.com/page2.html",
    {"mergeid": id, "format": "docx", "onfinish": function(id){
        GrabzIt("Sign in to view your Application Key").ConvertURL("http://www.example.com/page3.html",
        {"mergeid": id, "format": "docx"}).Create();
    }}).CreateInvisible();
}}).CreateInvisible ();
</script>
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_docx("http://www.example.com/page1.html");
client.save(null, function (err, id){
    if (err != null){
        throw err;
    }
    client.url_to_docx("http://www.example.com/page2.html",{"mergeId":id});
    client.save(null, function (err, id){
        if (err != null){
            throw err;
        }
        client.url_to_docx("http://www.example.com/page3.html",{"mergeId":id});
        client.save_to("documents/result.docx")
    });
});
#!/usr/bin/perl

use GrabzItClient;

$grabzIt = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret");
$options = GrabzItDOCXOptions->new();
$grabzIt->URLToDOCX("http://www.example.com/page1.html");
$options->mergeId($grabzIt->Save());
$grabzIt->URLToDOCX("http://www.example.com/page2.html", $options);
$options->mergeId($grabzIt->Save());
$grabzIt->URLToDOCX("http://www.example.com/page3.html", $options);
$grabzIt->SaveTo("documents/result.docx");
include("GrabzItClient.php");

$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
$options = new \GrabzIt\GrabzItDOCXOptions();
$grabzIt->URLToDOCX("http://www.example.com/page1.html");
$options->setMergeId($grabzIt->Save());
$grabzIt->URLToDOCX("http://www.example.com/page2.html", $options);
$options->setMergeId($grabzIt->Save());
$grabzIt->URLToDOCX("http://www.example.com/page3.html", $options);
$grabzIt->SaveTo("documents/result.docx");
from GrabzIt import GrabzItClient
from GrabzIt import GrabzItDOCXOptions

grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret")
options = GrabzItDOCXOptions.GrabzItDOCXOptions()
grabzIt.URLToDOCX("http://www.example.com/page1.html") 
options.mergeId = grabzIt.Save()
grabzIt.URLToDOCX("http://www.example.com/page2.html", options) 
options.mergeId = grabzIt.Save() 
grabzIt.URLToDOCX("http://www.example.com/page3.html", options) 
grabzIt.SaveTo("documents/result.docx") 
require 'grabzit'

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")
options = GrabzIt::DOCXOptions.new()
grabzItClient.url_to_docx("http://www.example.com/page1.html")	
options.mergeId = grabzItClient.save() 	
grabzItClient.url_to_docx("http://www.example.com/page2.html", options)	
options.mergeId = grabzItClient.save() 
grabzItClient.url_to_docx("http://www.example.com/page3.html", options)	
grabzItClient.save_to("documents/result.docx")