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

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

ASP.NET API

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

ਮੁ Optionsਲੇ ਚੋਣਾਂ

ਇੱਕ ਪੀਡੀਐਫ ਸਕ੍ਰੀਨਸ਼ਾਟ ਪੂਰੇ ਵੈਬਪੇਜ ਨੂੰ ਕੈਪਚਰ ਕਰ ਲਵੇਗੀ ਅਤੇ ਇੱਕ ਪੀਡੀਐਫ ਦਸਤਾਵੇਜ਼ ਤਿਆਰ ਕਰੇਗੀ ਜੋ ਕਿ ਅਸਲ ਵੈਬਪੰਨੇ ਜਿੰਨੀ ਲੰਬਾਈ ਹੈ. ਵੈਬ ਪੇਜ ਨੂੰ ਬਦਲਣ ਲਈ ਸਿਰਫ ਇੱਕ ਪੈਰਾਮੀਟਰ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ 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.CustomId = "123456";

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

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

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

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

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

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

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

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

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

PDFOptions options = new PDFOptions();
options.MarginTop = 20;
options.MarginBottom = 20;
options.TemplateId = "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.MarginTop = 20;
options.MarginBottom = 20;
options.TemplateId = "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.MarginTop = 20;
options.MarginBottom = 20;
options.TemplateId = "my template";

grabzIt.FileToPDF("example.html", options);
//Then call the Save or SaveTo method
grabzIt.SaveTo("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 = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");

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

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

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