Get a Free Trial

GrabzIt Client with ASP.NET

Download
ASP.NET API

Description

This class handles all communication with the GrabzIt screenshot web services. All of the methods marked with COM also work when the GrabzIt ASP.NET DLL is used as a COM Object.

Public Methods

GrabzItFile GetResult(string id)COM

GrabzItFile GetResultAsync(string id)

This method returns the capture itself. If nothing is returned then something has gone wrong or the capture is not ready yet.

Parameters

Return Value

GrabzItFile object


URLToAnimation(string url, AnimationOptions options)COM

Specifiy the URL of the online video that should be converted into a animated GIF.

Parameters

Return Value

void

AnimationOptionsCOM

NamespaceGrabzIt.Parameters

The class represents all of the options available when creating an animated GIF.

Public Properties


URLToImage(string url, ImageOptions options)COM

Specifies the URL that should be converted into a image screenshot.

Parameters

Return Value

void

HTMLToImage(string html, ImageOptions options)COM

Specifies the HTML that should be converted into a image.

Parameters

Return Value

void

FileToImage(string path, ImageOptions options)COM

Specifies a HTML file that should be converted into a image.

Parameters

Return Value

void

ImageOptionsCOM

NamespaceGrabzIt.Parameters

The class represents all of the options available when creating image captures.

Public Properties

Public Methods


URLToRenderedHTML(string url, HTMLOptions options)COM

Specifies the URL that should be converted into rendered HTML.

Parameters

Return Value

void

HTMLToRenderedHTML(string html, HTMLOptions options)COM

Specifies the HTML that should be converted into rendered HTML.

Parameters

Return Value

void

FileToRenderedHTML(string path, HTMLOptions options)COM

Specifies a HTML file that should be converted into rendered HTML.

Parameters

Return Value

void

HTMLOptionsCOM

NamespaceGrabzIt.Parameters

The class represents all of the options available when creating rendered HTML captures.

Public Properties

Public Methods


URLToVideo(string url, VideoOptions options)COM

Specifies the URL that should be converted into a video.

Parameters

Return Value

void

HTMLToVideo(string html, VideoOptions options)COM

Specifies the HTML that the video should be captured from.

Parameters

Return Value

void

FileToVideo(string path, VideoOptions options)COM

Specifies a HTML file that should be converted into a video.

Parameters

Return Value

void

VideoOptionsCOM

NamespaceGrabzIt.Parameters

The class represents all of the options available when creating a video of a webpage.

Public Properties

Public Methods


URLToPDF(string url, PDFOptions options)COM

Specifies the URL that should be converted into a PDF.

Parameters

Return Value

void

HTMLToPDF(string html, PDFOptions options)COM

Specifies the HTML that should be converted into a PDF.

Parameters

Return Value

void

FileToPDF(string path, PDFOptions options)COM

Specifies a HTML file that should be converted into a PDF.

Parameters

Return Value

void

PDFOptionsCOM

NamespaceGrabzIt.Parameters

The class represents all of the options available when creating PDF captures.

Public Properties

Public Methods


URLToDOCX(string url, DOCXOptions options)COM

Specifies the URL that should be converted into a DOCX.

Parameters

Return Value

void

HTMLToDOCX(string html, DOCXOptions options)COM

Specifies the HTML that should be converted into a DOCX.

Parameters

Return Value

void

FileToDOCX(string path, DOCXOptions options)COM

Specifies a HTML file that should be converted into a DOCX.

Parameters

Return Value

void

DOCXOptionsCOM

NamespaceGrabzIt.Parameters

The class represents all of the options available when creating DOCX captures.

Public Properties

Public Methods


URLToTable(string url, TableOptions options)COM

Specifies the URL that the HTML tables should be extracted from.

Parameters

Return Value

void

HTMLToTable(string html, TableOptions options)COM

Specifies the HTML that the HTML tables should be extracted from.

Parameters

Return Value

void

FileToTable(string path, TableOptions options)COM

Specifies a HTML file that the HTML tables should be extracted from.

Parameters

Return Value

void

TableOptionsCOM

NamespaceGrabzIt.Parameters

The class represents all of the options available when converting HTML tables to CSV, XLSX or JSON.

Public Properties

Public Methods


Save(string callBackURL = "")COM

SaveAsync(string callBackURL = "")

Save the result asynchronously and returns a unique identifier, which can be used to get the screenshot with the GetResultAsync method.

Parameters

Return Value

The unique identifier of the screenshot otherwise if a error has occured an exception is thrown. This can be used to get the screenshot with the GetResultAsync method


GrabzItFile SaveTo()

GrabzItFile SaveToAsync()

Save the result asynchronously to a GrabzItFile object.

Return Value

GrabzItFile object


SaveTo(string saveToFile)COM

SaveToAsync(string saveToFile)

Save the result to a file.

Parameters

Return Value

returns the true if it is successful otherwise it throws an exception.


Status GetStatus(string id)COM

Status GetStatusAsync(string id)

Get the current status of a GrabzIt screenshot.

Parameters

Return Value

Status object


GrabzItCookie[] GetCookies(string domain)COM

GrabzItCookie[] GetCookiesAsync(string domain)

Get all the cookies that GrabzIt is using for a particular domain. This may include user defined cookies as well.

Parameters

Return Value

GrabzItCookie array


SetCookie(string name, string domain, string value, string path, bool httponly, DateTime? expires)COM

SetCookieAsync(string name, string domain, string value, string path, bool httponly, DateTime? expires)

Sets a new custom cookie on GrabzIt, if the custom cookie has the same name and domain as a global cookie the global cookie is overridden.

This can be useful if a websites functionality is controlled by cookies.

Parameters

Return Value

True if the cookie is successfully set, otherwise false


DeleteCookie(string name, string domain)COM

DeleteCookieAsync(string name, string domain)

Delete a custom cookie or block a global cookie from being used

Parameters

Return Value

True if the cookie is successfully deleted, otherwise false


WaterMark[] GetWaterMarks(String identifier)COM

WaterMark[] GetWaterMarksAsync(String identifier)

Get all your uploaded custom watermarks

Return Value

WaterMark array


WaterMark GetWaterMark(String identifier)COM

WaterMark GetWaterMarkAsync(String identifier)

Return your custom watermark that matches the specified identifier

Parameters

Return Value

WaterMark


AddWaterMark(string identifier, string path, HorizontalPosition xpos, VerticalPosition ypos)COM

Add a new custom watermark

Parameters

Return Value

returns true if the watermark was successfully set


DeleteWaterMark(string identifier)COM

DeleteWaterMarkAsync(string identifier)

Delete a custom watermark

Parameters

Return Value

returns true if the watermark was successfully deleted


SetLocalProxy(string proxyUrl)COM

This method enables a local proxy server to be used for all requests.

Parameters


UseSSL(bool value)COM

Specifies if requests to GrabzIt's API should use SSL

Parameters


string CreateEncryptionKey()COM

Create a cryptographically secure base 64 encryption key, 44 characters long.


Decrypt(string path, string key)COM

Decrypt an encrypted capture using the provided encryption key.

Parameters


GrabzItFile Decrypt(GrabzItFile file, string key)

Decrypt an encrypted capture using the provided encryption key.

Parameters


byte[] Decrypt(byte[] data, string key)

Decrypt an encrypted capture using the provided encryption key.

Parameters


bool WriteResultToStream(string id, Stream outStream)

This method writes the capture to the stream. If the capture is successfully written to the stream the method will return true.

Parameters

Return Value

GrabzItFile object


When setting enum properties in COM objects use the equivalent numeric value for the enum instead.

Enums

ImageFormat

NamespaceGrabzIt.Enums

This enum comprises of the following values.


BrowserType

NamespaceGrabzIt.Enums

This enum comprises of the following values.


Country

NamespaceGrabzIt.Enums

This enum comprises of the following values.


PageSize

NamespaceGrabzIt.Enums

This enum comprises of the following values.


PageOrientation

NamespaceGrabzIt.Enums

This enum comprises of the following values.


CSSMediaType

NamespaceGrabzIt.Enums

This enum comprises of the following values.


TableFormat

NamespaceGrabzIt.Enums

This enum comprises of the following values.


HorizontalPosition

NamespaceGrabzIt.Enums

This enum comprises of the following values.


VerticalPosition

NamespaceGrabzIt.Enums

This enum comprises of the following values.


Result Classes

GrabzItCookieCOM

NamespaceGrabzIt.Cookies

Public Properties

GrabzItFileCOM

NamespaceGrabzIt.Screenshots

Public Methods

Public Properties

StatusCOM

NamespaceGrabzIt.Screenshots

The class representing the current status of the screenshot.

Public Properties

WaterMarkCOM

NamespaceGrabzIt.Screenshots

This class represents the custom watermarks stored in GrabzIt

Public Methods

Public Properties