ਵੈੱਬ ਨੂੰ ਕੈਪਚਰ ਅਤੇ ਕਨਵਰਟ ਕਰਨ ਲਈ ਟੂਲ

URL ਅਤੇ HTML ਨੂੰ DOCX ਵਿੱਚ ਬਦਲੋ

Node.js API

HTML ਜਾਂ ਵੈਬ ਪੇਜਾਂ ਨੂੰ ਬਦਲਣ ਦੀ ਯੋਗਤਾ ਸ਼ਾਮਲ ਕਰਨਾ into ਤੁਹਾਡੀ ਅਰਜ਼ੀ ਦੇ ਸ਼ਬਦ ਦਸਤਾਵੇਜ਼ ਇਸ ਨਾਲ ਕਦੇ ਵੀ ਅਸਾਨ ਨਹੀਂ ਹੋਏ ਗਰੈਬਜ਼ਿਟ ਦਾ ਨੋਡ.ਜਜ਼ ਏਪੀਆਈ. ਪਰ ਤੁਹਾਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਯਾਦ ਰੱਖੋ ਕਿ ਫੋਨ ਕਰਨ ਤੋਂ ਬਾਅਦ url_to_docx, html_to_docx or file_to_docx theੰਗ save or save_to ਅਸਲ ਵਿੱਚ DOCX ਬਣਾਉਣ ਲਈ methodੰਗ ਨੂੰ ਬੁਲਾਇਆ ਜਾਣਾ ਚਾਹੀਦਾ ਹੈ.

ਮੁ Optionsਲੇ ਚੋਣਾਂ

ਵੈਬ ਪੇਜਾਂ ਨੂੰ ਡੀਓਸੀਐਕਸ ਦੇ ਤੌਰ ਤੇ ਕੈਪਚਰ ਕਰਨਾ ਪੂਰੇ ਵੈੱਬ ਪੇਜ ਨੂੰ ਬਦਲਦਾ ਹੈ intoa ਵਰਡ ਡੌਕੂਮੈਂਟ ਜਿਸ ਵਿੱਚ ਬਹੁਤ ਸਾਰੇ ਪੰਨੇ ਹੋ ਸਕਦੇ ਹਨ. ਵੈਬ ਪੇਜ ਨੂੰ ਬਦਲਣ ਲਈ ਸਿਰਫ ਇੱਕ ਪੈਰਾਮੀਟਰ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ intoa ਵਰਡ ਡੌਕੂਮੈਂਟ ਜਾਂ HTML ਨੂੰ DOCX ਵਿੱਚ ਤਬਦੀਲ ਕਰੋ ਜਿਵੇਂ ਕਿ ਹੇਠਾਂ ਦਿੱਤੀਆਂ ਉਦਾਹਰਣਾਂ ਵਿੱਚ ਦਿਖਾਇਆ ਗਿਆ ਹੈ.

client.url_to_docx("https://www.tesla.com");
//Then call the save or save_to method
client.html_to_docx("<html><body><h1>Hello World!</h1></body></html>");
//Then call the save or save_to method
client.file_to_docx("example.html");
//Then call the save or save_to method

ਕਸਟਮ ਪਛਾਣਕਰਤਾ

ਤੁਸੀਂ ਇੱਕ ਕਸਟਮ ਪਛਾਣਕਰਤਾ ਨੂੰ ਪਾਸ ਕਰ ਸਕਦੇ ਹੋ ਡੌਕਸ shownੰਗ ਜਿਵੇਂ ਹੇਠਾਂ ਦਰਸਾਏ ਗਏ ਹਨ, ਇਹ ਮੁੱਲ ਤਦ ਤੁਹਾਡੇ ਗਰੈਬਜ਼ ਨੋਡ.ਜੇਜ਼ ਹੈਂਡਲਰ ਨੂੰ ਵਾਪਸ ਕਰ ਦਿੱਤਾ ਜਾਵੇਗਾ. ਉਦਾਹਰਣ ਦੇ ਲਈ ਇਹ ਕਸਟਮ ਪਛਾਣਕਰਤਾ ਇੱਕ ਡੇਟਾਬੇਸ ਪਛਾਣਕਰਤਾ ਹੋ ਸਕਦਾ ਹੈ, ਜਿਸ ਨਾਲ ਇੱਕ DOCX ਦਸਤਾਵੇਜ਼ ਨੂੰ ਇੱਕ ਵਿਸ਼ੇਸ਼ ਡਾਟਾਬੇਸ ਰਿਕਾਰਡ ਨਾਲ ਜੋੜਿਆ ਜਾ ਸਕਦਾ ਹੈ.

var grabzit = require('grabzit');

var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");

var options = {"customId":123456};

client.url_to_docx("https://www.tesla.com", options);
//Then call the save method
client.save("http://www.example.com/handler", function (error, id){
    if (error != null){
        throw error;
    }
});
var grabzit = require('grabzit');

var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");

var options = {"customId":123456};

client.html_to_docx("<html><body><h1>Hello World!</h1></body></html>", options);
//Then call the save method
client.save("http://www.example.com/handler", function (error, id){
    if (error != null){
        throw error;
    }
});
var grabzit = require('grabzit');

var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");

var options = {"customId":123456};

client.file_to_docx("example.html", options);
//Then call the save method
client.save("http://www.example.com/handler", function (error, id){
    if (error != null){
        throw error;
    }
});

ਸਿਰਲੇਖ ਅਤੇ ਫੁੱਟਰ

ਕਿਸੇ ਵਰਡ ਡੌਕੂਮੈਂਟ ਵਿਚ ਸਿਰਲੇਖ ਜਾਂ ਫੁੱਟਰ ਜੋੜਨ ਲਈ ਤੁਸੀਂ ਬੇਨਤੀ ਕਰ ਸਕਦੇ ਹੋ ਕਿ ਤੁਸੀਂ ਕਿਸੇ ਵਿਸ਼ੇਸ਼ ਨੂੰ ਲਾਗੂ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ ਟੈਪਲੇਟ ਨੂੰ ਤਿਆਰ ਕੀਤਾ ਜਾ ਰਿਹਾ DOCX ਕਰਨ ਲਈ. ਇਹ ਨਮੂਨਾ ਹੋਣਾ ਚਾਹੀਦਾ ਹੈ saveਡੀ ਪਹਿਲਾਂ ਤੋਂ ਹੈ ਅਤੇ ਸਿਰਲੇਖ ਅਤੇ ਫੁੱਟਰ ਦੀ ਸਮੱਗਰੀ ਨੂੰ ਕਿਸੇ ਵਿਸ਼ੇਸ਼ ਵੇਰੀਏਬਲ ਦੇ ਨਾਲ ਦਰਸਾਏਗਾ. ਹੇਠਾਂ ਦਿੱਤੇ ਕੋਡ ਵਿੱਚ ਉਪਭੋਗਤਾ ਇੱਕ ਟੈਂਪਲੇਟ ਦੀ ਵਰਤੋਂ ਕਰ ਰਿਹਾ ਹੈ ਜਿਸ ਨੂੰ ਉਹਨਾਂ ਨੇ ਬਣਾਇਆ ਹੈ ਜਿਸ ਨੂੰ "ਮੇਰਾ ਟੈਂਪਲੇਟ" ਕਹਿੰਦੇ ਹਨ.

var grabzit = require('grabzit');

var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");

var options = {"templateId":"my template"};

client.url_to_docx("https://www.tesla.com", options);
//Then call the save or save_to method
client.save_to("result.docx", function (error, id){
    //this callback is called once the capture is downloaded
    if (error != null){
        throw error;
    }
});
var grabzit = require('grabzit');

var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");

var options = {"templateId":"my template"};

client.html_to_docx("<html><body><h1>Hello World!</h1></body></html>", options);
//Then call the save or save_to method
client.save_to("result.docx", function (error, id){
    //this callback is called once the capture is downloaded
    if (error != null){
        throw error;
    }
});
var grabzit = require('grabzit');

var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");

var options = {"templateId":"my template"};

client.file_to_docx("example.html", options);
//Then call the save or save_to method
client.save_to("result.docx", function (error, id){
    //this callback is called once the capture is downloaded
    if (error != null){
        throw error;
    }
});

HTML ਐਲੀਮੈਂਟ ਨੂੰ DOCX ਵਿੱਚ ਬਦਲੋ

ਜੇ ਤੁਸੀਂ ਸਿਰਫ ਇੱਕ HTML ਐਲੀਮੈਂਟ ਜਿਵੇਂ ਕਿ ਇੱਕ ਡਿਵ ਜਾਂ ਸਪੈਨ ਸਿੱਧੇ ਰੂਪ ਵਿੱਚ ਬਦਲਣਾ ਚਾਹੁੰਦੇ ਹੋ intਓ ਵਰਡ ਡੌਕੂਮੈਂਟ ਜੋ ਤੁਸੀਂ ਗਰੈਬਜ਼ਿਟ ਦੀ ਨੋਡ.ਜਜ਼ ਲਾਇਬ੍ਰੇਰੀ ਨਾਲ ਕਰ ਸਕਦੇ ਹੋ. ਤੁਹਾਨੂੰ ਪਾਸ ਕਰਨਾ ਚਾਹੀਦਾ ਹੈ CSS ਚੋਣਕਾਰ ਐਲੀਮੈਂਟਲ ਐਲਿਮੰਟ ਦਾ ਜਿਸ ਨੂੰ ਤੁਸੀਂ ਤਬਦੀਲ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ setTargetElement ਪੈਰਾਮੀਟਰ.

...
<span id="Article">
<p>This is the content I am interested in.</p>
<img src="myimage.jpg">
</span>
...

ਇਸ ਉਦਾਹਰਣ ਵਿੱਚ, ਅਸੀਂ ਸਾਰੀ ਸਮਗਰੀ ਨੂੰ ਉਸ ਅਵਧੀ ਵਿੱਚ ਕੈਪਚਰ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹਾਂ ਜਿਸ ਦੀ ਆਈ ਡੀ ਹੈ Article, ਇਸ ਲਈ ਅਸੀਂ ਇਸਨੂੰ ਗ੍ਰਾਬਜ਼ਆਈਟੀ ਏਪੀਆਈ ਨੂੰ ਹੇਠਾਂ ਦਰਸਾਉਂਦੇ ਹੋਏ ਪਾਸ ਕਰਦੇ ਹਾਂ.

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.bbc.co.uk/news", {"targetElement": "#Article"});
//Then call the save or save_to method
client.save_to("result.docx", function (error, id){
    //this callback is called once the capture is downloaded
    if (error != null){
        throw error;
    }
});