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

ਵੈਬਸਾਈਟ ਸਕ੍ਰੀਨਸ਼ਾਟ ਲਓ ਜਾਂ ਜਾਵਾ ਵਿੱਚ ਚਿੱਤਰਾਂ ਲਈ HTML ਨੂੰ ਬਦਲੋ

ਜਾਵਾ ਏਪੀਆਈ

ਵੈੱਬਸਾਈਟਾਂ ਦੇ ਸੰਪੂਰਨ ਚਿੱਤਰ ਸਕਰੀਨਸ਼ਾਟ ਬਣਾਓ ਜਾਂ ਹੇਠਾਂ ਦਿੱਤੀਆਂ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਦੀ ਵਰਤੋਂ ਕਰਕੇ HTML ਨੂੰ ਸਿੱਧਾ ਚਿੱਤਰਾਂ ਵਿੱਚ ਬਦਲੋ ਗਰੈਬਜ਼ੀਟ ਦਾ ਜਾਵਾ ਏਪੀਆਈ. ਪਰ ਤੁਹਾਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਯਾਦ ਰੱਖੋ ਕਿ ਫੋਨ ਕਰਨ ਤੋਂ ਬਾਅਦ URLToImage, HTMLToImage or FileToImage theੰਗ Save or SaveTo ਸਕ੍ਰੀਨਸ਼ਾਟ ਲੈਣ ਲਈ methodੰਗ ਨੂੰ ਬੁਲਾਉਣਾ ਲਾਜ਼ਮੀ ਹੈ.

ਮੁ Optionsਲੇ ਚੋਣਾਂ

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

grabzIt.URLToImage("https://www.tesla.com");
//Then call the Save or SaveTo method
grabzIt.HTMLToImage("<html><body><h1>Hello World!</h1></body></html>");
//Then call the Save or SaveTo method
grabzIt.FileToImage("example.html");
//Then call the Save or SaveTo method

ਚਿੱਤਰ ਸਕਰੀਨਸ਼ਾਟ ਫਾਰਮੈਟ

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

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setFormat(ImageFormat.PNG);

grabzIt.URLToImage("https://www.tesla.com", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.png");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setFormat(ImageFormat.PNG);

grabzIt.HTMLToImage("<html><body><h1>Hello World!</h1></body></html>", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.png");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setFormat(ImageFormat.PNG);

grabzIt.FileToImage("example.html", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.png");

ਬਰਾ Browਜ਼ਰ ਦਾ ਆਕਾਰ

ਬ੍ਰਾ .ਜ਼ਰ ਦਾ ਆਕਾਰ ਬ੍ਰਾ browserਜ਼ਰ ਵਿੰਡੋ ਦੇ ਆਕਾਰ ਨੂੰ ਦਰਸਾਉਂਦਾ ਹੈ ਜੋ ਸਕ੍ਰੀਨਸ਼ਾਟ ਕੈਪਚਰ ਕਰਨ ਵੇਲੇ ਵਰਤੀ ਜਾਏਗੀ ਜਦੋਂ ਇਸਨੂੰ ਸਥਾਪਤ ਕਰਨ ਦੀ ਜ਼ਰੂਰਤ ਨਹੀਂ ਹੁੰਦੀ ਕਿਉਂਕਿ ਡਿਫੌਲਟ ਬ੍ਰਾ .ਜ਼ਰ ਸਾਈਜ਼ ਲਗਭਗ ਸਾਰੇ ਕੰਮਾਂ ਲਈ ਕਾਫ਼ੀ ਹੋਵੇਗਾ. ਬਰਾ browserਜ਼ਰ ਦਾ ਆਕਾਰ ਨਿਰਧਾਰਤ ਕਰਨ ਲਈ ਸਿਰਫ ਇੱਕ ਮੁੱਲ ਦਿਓ setBrowserWidth ਅਤੇ setBrowserHeight ਦੇ methodsੰਗ ImageOptions ਕਲਾਸ.

ਚਿੱਤਰ ਅਕਾਰ ਬਦਲੋ

ਕਿਸੇ ਚਿੱਤਰ ਦੇ ਆਕਾਰ ਨੂੰ ਬਦਲਣਾ ਸੌਖਾ ਹੈ, ਇਸ ਨੂੰ ਚਿੱਤਰ ਨੂੰ ਭੰਗ ਕੀਤੇ ਬਿਨਾਂ ਕਰਨਾ ਥੋੜਾ isਖਾ ਹੈ. ਸਾਰੀ ਪ੍ਰਕਿਰਿਆ ਨੂੰ ਸੌਖਾ ਬਣਾਉਣ ਲਈ ਅਸੀਂ ਤੁਹਾਨੂੰ ਇਸ ਦੀ ਵਰਤੋਂ ਕਰਨ ਦੀ ਸਿਫਾਰਸ਼ ਕਰਦੇ ਹਾਂ ਸਧਾਰਣ ਚਿੱਤਰ ਮਾਪ ਮਾਪ ਕੈਲਕੁਲੇਟਰ.

ਜੇ ਤੁਸੀਂ ਚਿੱਤਰ ਦੀ ਚੌੜਾਈ ਅਤੇ ਉਚਾਈ ਨੂੰ ਬ੍ਰਾ browserਜ਼ਰ ਦੀ ਚੌੜਾਈ ਅਤੇ ਉਚਾਈ ਤੋਂ ਵੱਡੇ ਆਕਾਰ ਵਿਚ ਵਧਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ, ਜੋ ਕਿ ਮੂਲ ਰੂਪ ਵਿਚ 1366 ਦੁਆਰਾ 728 ਪਿਕਸਲ ਹੈ, ਤਾਂ ਬਰਾ browserਜ਼ਰ ਦੀ ਚੌੜਾਈ ਅਤੇ ਉਚਾਈ ਨੂੰ ਵੀ ਮਿਲਾਉਣ ਲਈ ਵਧਾਉਣਾ ਲਾਜ਼ਮੀ ਹੈ.

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

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

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setCustomId("123456");

grabzIt.URLToImage("https://www.tesla.com", options);
//Then call the Save method
grabzIt.Save("http://www.example.com/handler");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setCustomId("123456");

grabzIt.HTMLToImage("<html><body><h1>Hello World!</h1></body></html>", options);
//Then call the Save method
grabzIt.Save("http://www.example.com/handler");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setCustomId("123456");

grabzIt.FileToImage("example.html", options);
//Then call the Save method
grabzIt.Save("http://www.example.com/handler");

ਪੂਰੀ ਲੰਬਾਈ ਸਕਰੀਨਸ਼ਾਟ

GrabzIt ਤੁਹਾਨੂੰ ਇੱਕ ਪੂਰੇ ਵੈੱਬ ਪੇਜ ਦੀ ਪੂਰੀ ਲੰਬਾਈ ਦਾ ਸਕ੍ਰੀਨਸ਼ਾਟ ਲੈਣ ਦੀ ਆਗਿਆ ਦਿੰਦਾ ਹੈ ਅਜਿਹਾ ਕਰਨ ਲਈ ਤੁਹਾਨੂੰ ਇੱਕ -1 ਨੂੰ ਪਾਸ ਕਰਨ ਦੀ ਜ਼ਰੂਰਤ ਹੈ setBrowserHeight .ੰਗ. ਇਹ ਨਿਸ਼ਚਤ ਕਰਨ ਲਈ ਕਿ ਚਿੱਤਰ ਬਰਾ browserਜ਼ਰ ਦੇ ਆਕਾਰ ਨਾਲ ਮੇਲ ਖਾਂਦਾ ਹੈ ਇਸ ਨੂੰ ਇੱਕ -1 ਪਾਸ ਕਰਦਾ ਹੈ setHeight ਅਤੇ setWidth ਵਿਧੀਆਂ

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setBrowserHeight(-1);
options.setWidth(-1);
options.setHeight(-1);

grabzIt.URLToImage("https://www.tesla.com", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.jpg");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setBrowserHeight(-1);
options.setWidth(-1);
options.setHeight(-1);

grabzIt.HTMLToImage("<html><body><h1>Hello World!</h1></body></html>", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.jpg");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setBrowserHeight(-1);
options.setWidth(-1);
options.setHeight(-1);

grabzIt.FileToImage("example.html", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.jpg");

ਤੁਸੀਂ ਥੰਬਨੇਲ ਵੀ ਵਾਪਸ ਕਰ ਸਕਦੇ ਹੋ ਜੋ ਕੱਟੇ ਨਹੀਂ ਹੋਏ ਹਨ, ਪਰ ਸਾਵਧਾਨ ਰਹੋ ਇਹ ਵੱਡੀਆਂ ਤਸਵੀਰਾਂ ਬਣਾ ਸਕਦਾ ਹੈ. ਅਜਿਹਾ ਕਰਨ ਲਈ ਇੱਕ ਨੂੰ -1 ਪਾਸ ਕਰੋ setHeight ਅਤੇ/ਜਾਂ setWidth .ੰਗ. ਕੋਈ ਵੀ ਅਯਾਮ ਜੋ ਐਕਸ-ਐੱਨ.ਐੱਨ.ਐੱਮ.ਐੱਮ.ਐਕਸ ਪਾਸ ਕੀਤਾ ਜਾਂਦਾ ਹੈ, ਕੱਟਿਆ ਨਹੀਂ ਜਾਵੇਗਾ.

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setWidth(-1);
options.setHeight(-1);

grabzIt.URLToImage("https://www.tesla.com", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.jpg");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setWidth(-1);
options.setHeight(-1);

grabzIt.HTMLToImage("<html><body><h1>Hello World!</h1></body></html>", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.jpg");
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

ImageOptions options = new ImageOptions();
options.setWidth(-1);
options.setHeight(-1);

grabzIt.FileToImage("example.html", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.jpg");
ਧਿਆਨ ਦਿਓ ਕਿ ਬਰਾ browserਜ਼ਰ ਦੀ ਪੂਰੀ ਲੰਬਾਈ ਚੌੜਾਈ ਨਹੀਂ ਹੈ!

ਇਨ੍ਹਾਂ ਵਿਸ਼ੇਸ਼ ਕਦਰਾਂ ਕੀਮਤਾਂ ਦੀ ਵਰਤੋਂ ਕਰਨ ਦਾ ਮਤਲਬ ਇਹ ਹੈ ਕਿ ਤੁਸੀਂ ਇੱਕ ਸਕ੍ਰੀਨਸ਼ਾਟ ਬਣਾ ਸਕਦੇ ਹੋ ਜੋ ਤੁਸੀਂ ਚਾਹੁੰਦੇ ਹੋ ਤਾਂ ਪੂਰੇ ਵੈੱਬ ਪੇਜ ਦਾ ਇੱਕ ਪੂਰਾ ਪੈਮਾਨਾ ਵਰਜ਼ਨ ਹੈ!

ਪੇਜ ਐਲੀਮੈਂਟ ਦਾ ਸਕ੍ਰੀਨ ਸ਼ਾਟ ਲਓ

ਗਰੈਬਜਿਟ ਤੁਹਾਨੂੰ ਕਿਸੇ ਵੀ ਐਚਟੀਐਮਐਲ ਤੱਤ ਦਾ ਸਕ੍ਰੀਨ ਸ਼ਾਟ ਲੈਣ ਦੀ ਆਗਿਆ ਦਿੰਦਾ ਹੈ ਜਦੋਂ ਤੱਕ ਇਸਦਾ ਕੋਈ ਆਈਡੀ ਜਾਂ ਕਲਾਸ ਗੁਣ ਹੁੰਦਾ ਹੈ, ਜਿਵੇਂ ਕਿ div or span ਇਸ ਦੀ ਸਾਰੀ ਸਮੱਗਰੀ ਨੂੰ ਟੈਗ ਅਤੇ ਕੈਪਚਰ ਕਰੋ. ਇਹ ਕਰਨ ਲਈ, HTML ਐਲੀਮੈਂਟ ਜਿਸ ਦਾ ਤੁਸੀਂ ਸਕਰੀਨ ਸ਼ਾਟ ਲੈਣਾ ਚਾਹੁੰਦੇ ਹੋ, ਇੱਕ ਦੇ ਤੌਰ ਤੇ ਨਿਰਧਾਰਤ ਕੀਤਾ ਜਾਣਾ ਚਾਹੀਦਾ ਹੈ CSS ਚੋਣਕਾਰ.

...
<div id="features">
	<img src="http://www.example.com/football.jpg"/><h3>Local Team Loses</h3>
</div>
...

ਹੇਠਲੀ ਉਦਾਹਰਣ ਵਿੱਚ ਆਈਡੀ "ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ" ਵਾਲਾ ਡਿਵ ਕੈਪਚਰ ਕੀਤਾ ਗਿਆ ਹੈ ਅਤੇ ਇੱਕ 250 x 250px ਜੇਪੀਈਜੀ ਚਿੱਤਰ ਦੇ ਰੂਪ ਵਿੱਚ ਆਉਟਪੁੱਟ ਹੈ.

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

// The 250 parameters indicates that image should be sized to 250 x 250 px
ImageOptions options = new ImageOptions();
options.setWidth(250);
options.setHeight(250);
options.setFormat(ImageFormat.JPG);
options.setTargetElement("#features");

grabzIt.URLToImage("http://www.bbc.co.uk/news", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.jpg");

ਅਗਲੀ ਉਦਾਹਰਣ ਨੇ ਫਿਰ "ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ" ਡਿਵ ਨੂੰ ਕੈਪਚਰ ਕੀਤਾ ਪਰ ਇਸ ਵਾਰ ਇੱਕ ਜੇ ਪੀ ਈ ਜੀ ਚਿੱਤਰ ਨੂੰ ਬਾਹਰ ਕੱ thatਿਆ ਜੋ ਬਿਲਕੁਲ ਡਿਵ ਦੇ ਉਸੇ ਅਕਾਰ ਦਾ ਹੈ.

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

// The -1 indicates that image should not be cropped
ImageOptions options = new ImageOptions();
options.setWidth(-1);
options.setHeight(-1);
options.setBrowserHeight(-1);
options.setFormat(ImageFormat.JPG);
options.setTargetElement("#features");

grabzIt.URLToImage("http://www.bbc.co.uk/news", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("result.jpg");