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

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

ਜਾਵਾ ਏਪੀਆਈ

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

ਪਰ ਤੁਹਾਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਯਾਦ ਰੱਖੋ ਕਿ ਫੋਨ ਕਰਨ ਤੋਂ ਬਾਅਦ URLToPDF, HTMLToPDF or FileToPDF .ੰਗ. ਕਿਸੇ ਵੀ Save or SaveTo screenੰਗ ਨੂੰ ਪੀਡੀਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਲੈਣ ਲਈ ਜਾਂ HTML ਨੂੰ ਸਿੱਧਾ ਪੀਡੀਐਫ ਵਿੱਚ ਬਦਲਣ ਲਈ ਬੁਲਾਇਆ ਜਾਣਾ ਚਾਹੀਦਾ ਹੈ.

ਮੁ Optionsਲੇ ਚੋਣਾਂ

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

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

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

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

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

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

grabzIt.URLToPDF("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");

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

grabzIt.HTMLToPDF("<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");

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

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

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

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

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

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

PDFOptions options = new PDFOptions();
options.setMarginTop(20);
options.setMarginBottom(20);
options.setTemplateId("my template");

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

PDFOptions options = new PDFOptions();
options.setMarginTop(20);
options.setMarginBottom(20);
options.setTemplateId("my template");

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

PDFOptions options = new PDFOptions();
options.setMarginTop(20);
options.setMarginBottom(20);
options.setTemplateId("my template");

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

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

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

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

ਇਸ ਉਦਾਹਰਣ ਵਿੱਚ, ਅਸੀਂ ਸਾਰੀ ਸਮਗਰੀ ਨੂੰ ਉਸ ਅਵਧੀ ਵਿੱਚ ਕੈਪਚਰ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹਾਂ ਜਿਸ ਦੀ ਆਈ ਡੀ ਹੈ Article. ਹੇਠਾਂ ਦਿਖਾਇਆ ਗਿਆ ਹੈ, ਇਸ ਲਈ ਅਸੀਂ ਇਸ ID ਨੂੰ GrabzIt ਨੂੰ ਦਿੰਦੇ ਹਾਂ.

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

PDFOptions options = new PDFOptions();
options.setTargetElement("#Article");

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

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