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

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

ਰੂਬੀ ਏ.ਪੀ.ਆਈ.

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

ਮੁ Optionsਲੇ ਚੋਣਾਂ

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

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

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

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

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::DOCXOptions.new()
options.customId = "123456"

grabzItClient.url_to_docx("https://www.tesla.com", options)
# Then call the save method
grabzItClient.save("http://www.example.com/handler/index")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::DOCXOptions.new()
options.customId = "123456"

grabzItClient.html_to_docx("<html><body><h1>Hello World!</h1></body></html>", options)
# Then call the save method
grabzItClient.save("http://www.example.com/handler/index")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::DOCXOptions.new()
options.customId = "123456"

grabzItClient.file_to_docx("example.html", options)
# Then call the save method
grabzItClient.save("http://www.example.com/handler/index")

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

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

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::DOCXOptions.new()
options.templateId = "my template"

grabzItClient.url_to_docx("https://www.tesla.com", options)
# Then call the save or save_to method
grabzItClient.save_to("result.docx")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::DOCXOptions.new()
options.templateId = "my template"

grabzItClient.html_to_docx("<html><body><h1>Hello World!</h1></body></html>", options)
# Then call the save or save_to method
grabzItClient.save_to("result.docx")
grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::DOCXOptions.new()
options.templateId = "my template"

grabzItClient.file_to_docx("example.html", options)
# Then call the save or save_to method
grabzItClient.save_to("result.docx")

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

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

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

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

grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::DOCXOptions.new()
options.targetElement = "#Article"

grabzItClient.url_to_docx("http://www.bbc.co.uk/news", options)
# Then call the save or save_to method
grabzItClient.save_to("result.docx")