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

ਵੈਬ ਪੇਜਾਂ ਅਤੇ HTML ਨੂੰ ਪੀਡੀਐਫ ਵਿੱਚ ਬਦਲੋ

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

ਜਦੋਂ ਵੈੱਬਪੇਜਾਂ ਜਾਂ HTML ਸਨਿੱਪਟ ਨੂੰ ਸਿੱਧਾ ਪੀਡੀਐਫ ਵਿੱਚ ਤਬਦੀਲ ਕਰਦੇ ਹੋ ਗਰੈਬਜ਼ਿਟ ਦਾ ਰੂਬੀ ਏ.ਪੀ.ਆਈ. ਹੇਠ ਲਿਖੀਆਂ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਪ੍ਰਦਾਨ ਕਰਦੇ ਹਨ ਜੋ ਸਹਾਇਤਾ ਕਰਦੀਆਂ ਹਨ intਉਦਾਹਰਣ ਲਈ GrabzIt intਓ ਤੁਹਾਡਾ ਸਿਸਟਮ ਜਿੰਨਾ ਸੰਭਵ ਹੋ ਸਕੇ ਆਸਾਨੀ ਨਾਲ. ਪਰ ਤੁਹਾਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਯਾਦ ਰੱਖੋ ਕਿ ਫੋਨ ਕਰਨ ਤੋਂ ਬਾਅਦ set_pdf_options methodੰਗ ਹੈ save or save_to ਪੀਡੀਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਲੈਣ ਲਈ methodੰਗ ਨੂੰ ਬੁਲਾਉਣਾ ਲਾਜ਼ਮੀ ਹੈ.

ਮੁ Optionsਲੇ ਚੋਣਾਂ

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

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

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

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

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

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

grabzItClient.url_to_pdf("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::PDFOptions.new()
options.customId = "123456"

grabzItClient.html_to_pdf("<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::PDFOptions.new()
options.customId = "123456"

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

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

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

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

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

options = GrabzIt::PDFOptions.new()
options.marginTop = 20
options.marginBottom = 20
options.templateId = "my template"

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

options = GrabzIt::PDFOptions.new()
options.marginTop = 20
options.marginBottom = 20
options.templateId = "my template"

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

options = GrabzIt::PDFOptions.new()
options.marginTop = 20
options.marginBottom = 20
options.templateId = "my template"

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

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

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

...
<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::PDFOptions.new()
options.targetElement = "#Article"

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

ਇੱਕ ਐਚਡੀਐਮਐਲ ਐਲੀਮੈਂਟ ਨੂੰ ਨਿਸ਼ਾਨਾ ਬਣਾਉਂਦੇ ਸਮੇਂ ਇੱਕ ਪੀਡੀਐਫ ਕਿਵੇਂ ਤਿਆਰ ਕੀਤੀ ਜਾਂਦੀ ਹੈ ਇਨ੍ਹਾਂ ਤਕਨੀਕਾਂ ਦੀ ਵਰਤੋਂ ਨਾਲ ਨਿਯੰਤਰਿਤ.