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

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

ਜਾਵਾ ਏਪੀਆਈ

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

ਮੁ Optionsਲੇ ਚੋਣਾਂ

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

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

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

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

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

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

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

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

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

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

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

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

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

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

DOCXOptions options = new DOCXOptions();
options.setTemplateId("my template");

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

DOCXOptions options = new DOCXOptions();
options.setTemplateId("my template");

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

DOCXOptions options = new DOCXOptions();
options.setTemplateId("my template");

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

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

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

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

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

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

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

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