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)
- GrabzItFile GetResultAsync(string id)
- URLToAnimation(string url, AnimationOptions options)
- URLToImage(string url, ImageOptions options)
- HTMLToImage(string html, ImageOptions options)
- FileToImage(string path, ImageOptions options)
- URLToPDF(string url, PDFOptions options)
- HTMLToPDF(string html, PDFOptions options)
- FileToPDF(string path, PDFOptions options)
- URLToDOCX(string url, DOCXOptions options)
- HTMLToDOCX(string html, DOCXOptions options)
- FileToDOCX(string path, DOCXOptions options)
- URLToTable(string url, TableOptions options)
- HTMLToTable(string html, TableOptions options)
- FileToTable(string path, TableOptions options)
- URLToRenderedHTML(string url, HTMLOptions options)
- HTMLToRenderedHTML(string html, HTMLOptions options)
- FileToRenderedHTML(string path, HTMLOptions options)
- URLToVideo(string url, VideoOptions options)
- HTMLToVideo(string html, VideoOptions options)
- FileToVideo(string path, VideoOptions options)
- string Save(string callBackURL = "")
- string SaveAsync(string callBackURL = "")
- GrabzItFile SaveTo()
- GrabzItFile SaveToAsync()
- bool SaveTo(string saveToFile)
- bool SaveToAsync(string saveToFile)
- Status GetStatus(string id)
- Status GetStatusAsync(string id)
- GrabzItCookie[] GetCookies(string domain)
- GrabzItCookie[] GetCookiesAsync(string domain)
- bool SetCookie(string name, string domain, string value, string path, bool httponly, DateTime? expires)
- bool SetCookieAsync(string name, string domain, string value, string path, bool httponly, DateTime? expires)
- bool DeleteCookie(string name, string domain)
- bool DeleteCookieAsync(string name, string domain)
- WaterMark[] GetWaterMarks()
- WaterMark[] GetWaterMarksAsync()
- WaterMark GetWaterMark(string identifier)
- bool AddWaterMark(string identifier, string path, HorizontalPosition xpos, VerticalPosition ypos)
- bool DeleteWaterMark(string identifier)
- bool DeleteWaterMarkAsync(string identifier)
- SetLocalProxy(string proxyUrl)
- UseSSL(bool value)
- string CreateEncryptionKey()
- Decrypt(string path, string key)
- GrabzItFile Decrypt(GrabzItFile file, string key)
- byte[] Decrypt(byte[] data, string key)
- bool WriteResultToStream(string id, Stream outStream)
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
-
id - the unique identifier of the capture
Return Value
GrabzItFile object
Specifiy the URL of the online video that should be converted into a animated GIF.
Parameters
-
url - the URL of the online video to convert into an animated GIF.
- Required
-
Accepts Vimeo and YouTube video URL's
- Warning animating Vimeo and YouTube videos depends on a third party and so may not provide consistent results.
-
options - a instance of the AnimationOptions class that defines any special options to use when creating the animated GIF.
- Required for COM otherwise optional
Return Value
void
AnimationOptionsCOM
NamespaceGrabzIt.Parameters
The class represents all of the options available when creating an animated GIF.
Public Properties
-
string CustomId - custom identifier that you can pass through to the animated GIF web service. This will be returned with the callback URL you have specified.
-
int Width - the width of the resulting animated GIF in pixels.
- Default: 180px
- Maximum: Maximum width for package
- Auto-size: -1 (passing -1 means that the width of the animated GIF is scaled in relation to its height, if the width is being auto-sized the height cannot)
-
int Height - the height of the resulting animated GIF in pixels.
- Default: 120px
- Maximum: Maximum height for package
- Auto-size: -1 (passing -1 means that the height of the animated GIF is scaled in relation to its width, if the height is being auto-sized the width cannot)
-
int Start - the starting position of the video that should be converted into a animated GIF.
-
int Duration - the length in seconds of the video that should be converted into a animated GIF.
- Default: maximum length for package
-
float Speed - the speed of the animated GIF.
- Default: 1
- Minimum: 0.2
- Maximum: 10
-
float FramesPerSecond - the number of frames per second that should be captured from the video.
- Default: 10
- Minimum: 0.2
- Maximum: 60
-
int Repeat - number of times to loop the animated GIF.
- Default: 0
- Loop Continuously: 0
- Never Loop: -1
-
bool Reverse - if true the frames of the animated GIF are reversed
-
string CustomWaterMarkId - add custom watermark or special watermark to the animated GIF
-
int Quality - the quality of the returned image, which has a default compression of 85%.
- Reducing the quality will reduce the filesize and reduce download times.
- Default: -1
- Minimum: -1
- Maximum: 100
-
Country Country - the country the animated GIF should be taken from.
-
string ExportURL - the export URL that specifies where the capture should be exported too.
-
string EncryptionKey - if a base 64 encoded AES encryption key is specified your capture is encrypted when it is created. It is recommended to use the create encryption key method to create the key and the decrypt methods to decrypt the encrypted capture as shown in this example.
-
string Proxy - the HTTP proxy details the browser software should use to use to create this capture
URLToImage(string url, ImageOptions options)COM
Specifies the URL that should be converted into a image screenshot.
Parameters
-
url - the URL that the screenshot should be made of
-
options - a instance of the ImageOptions class that defines any special options to use when creating the screenshot.
- Required for COM otherwise optional
Return Value
void
HTMLToImage(string html, ImageOptions options)COM
Specifies the HTML that should be converted into a image.
Parameters
-
html - the HTML to convert into a image
- options - a instance of the ImageOptions class that defines any special options to use when creating an image.
Return Value
void
FileToImage(string path, ImageOptions options)COM
Specifies a HTML file that should be converted into a image.
Parameters
-
path - the file path of a HTML file to convert into a image
-
options - a instance of the ImageOptions class that defines any special options to use when creating an image.
- Required for COM otherwise optional
Return Value
void
ImageOptionsCOM
NamespaceGrabzIt.Parameters
The class represents all of the options available when creating image captures.
Public Properties
-
string CustomId - custom identifier that you can pass through to the screenshot webservice. This will be returned with the callback URL you have specified.
-
int BrowserWidth - the width of the browser in pixels
- Default: 1366
- Maximum: 10000
-
int BrowserHeight - the height of the browser in pixels
- Default: 1170
- Maximum: 10000
- Full Length: -1 (passing -1 means that a sceenshot of the whole web page is taken)
-
int OutputWidth - the width of the resulting thumbnail in pixels
- Default: if both the output width and output height are not specified or 0 then the output width and height will match the final image width and height, if the output height is specified the output width will be proportional to the output height
- Maximum: Maximum width for package
- Full Width: -1 (passing -1 means that the width of the thumbnail is not reduced)
-
int OutputHeight - the height of the resulting thumbnail in pixels
- Default: if both the output width and output height are not specified or 0 then the output width and height will match the final image width and height, if the output width is specified the output height will be proportional to the output width
- Maximum: Maximum height for package
- Full Height: -1 (passing -1 means that the height of the thumbnail is not reduced)
-
ImageFormat Format - the format the screenshot should be in.
-
int Delay - the number of milliseconds to wait before taking the screenshot
- Default: 0
- Maximum: 30000
-
string ClickElement - this specifies the HTML element, using a CSS selector to click. Remember a delay may also be required to view the effects of the click
-
string TargetElement - the CSS selector of the only HTML element on the target web page that is to be turned into a screenshot, all other parts of the web page are ignored. If there are multiple matching HTML elements the first one is chosen
-
string HideElement - the CSS selectors of the one or more HTML elements in the web page to hide, to specify multiple HTML elements to hide seperate each selector with a comma
-
string WaitForElement - the CSS selectors of the HTML element in the web page that must be visible before the capture is performed
-
BrowserType RequestAs - the type of user agent you wish to use
-
string CustomWaterMarkId - add a custom watermark or special watermark to the image
-
int Quality - the quality of the returned image. This currently only effects JPG and WEBP images, which have a default compression of 90%.
- Reducing the quality will reduce the filesize and reduce download times.
- Default: -1
- Minimum: -1
- Maximum: 100
-
bool Transparent - if true if the image capture should be transparent. This is only compatible with png and tiff images.
-
bool HD - if true the image capture will be in high definition this doubles the size of the image dimensions.
-
Country Country - the country the screenshot should be taken from.
-
string ExportURL - the export URL that specifies where the capture should be exported too
-
string EncryptionKey - if a base 64 encoded AES encryption key is specified your capture is encrypted when it is created. It is recommended to use the create encryption key method to create the key and the decrypt methods to decrypt the encrypted capture as shown in this example.
-
bool NoAds - if true adverts should be automatically hidden.
-
bool NoCookieNotifications - if true all commonly found cookie notifications should be automatically hidden.
-
string Address - the URL to execute the HTML code in. Can be useful if the HTML being converted uses relative URL's for resources such as CSS and images.
-
string Proxy - the HTTP proxy details the browser software should use to use to create this capture
Public Methods
-
AddPostParameter(string name, string value) - defines a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force GrabzIt to perform a HTTP post.
- name - the name of the HTTP Post parameter
- value - the value of the HTTP Post parameter
URLToRenderedHTML(string url, HTMLOptions options)COM
Specifies the URL that should be converted into rendered HTML.
Parameters
-
url - the URL that the rendered HTML should be made of
-
options - a instance of the HTMLOptions class that defines any special options to use when creating the rendered HTML.
- Required for COM otherwise optional
Return Value
void
HTMLToRenderedHTML(string html, HTMLOptions options)COM
Specifies the HTML that should be converted into rendered HTML.
Parameters
-
html - the HTML to convert into rendered HTML
- options - a instance of the HTMLOptions class that defines any special options to use when creating rendered HTML.
Return Value
void
FileToRenderedHTML(string path, HTMLOptions options)COM
Specifies a HTML file that should be converted into rendered HTML.
Parameters
-
path - the file path of a HTML file to convert into rendered HTML
-
options - a instance of the HTMLOptions class that defines any special options to use when creating rendered HTML.
- Required for COM otherwise optional
Return Value
void
HTMLOptionsCOM
NamespaceGrabzIt.Parameters
The class represents all of the options available when creating rendered HTML captures.
Public Properties
Public Methods
-
AddPostParameter(string name, string value) - defines a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force GrabzIt to perform a HTTP post.
- name - the name of the HTTP Post parameter
- value - the value of the HTTP Post parameter
URLToVideo(string url, VideoOptions options)COM
Specifies the URL that should be converted into a video.
Parameters
-
url - the URL that the video should be captured from
-
options - a instance of the VideoOptions class that defines any special options to use when creating the video.
- Required for COM otherwise optional
Return Value
void
HTMLToVideo(string html, VideoOptions options)COM
Specifies the HTML that the video should be captured from.
Parameters
-
html - the HTML to convert into a video
- options - a instance of the VideoOptions class that defines any special options to use when creating the video.
Return Value
void
FileToVideo(string path, VideoOptions options)COM
Specifies a HTML file that should be converted into a video.
Parameters
-
path - the file path of a HTML file to convert into a video
-
options - a instance of the VideoOptions class that defines any special options to use when creating the video.
- Required for COM otherwise optional
Return Value
void
VideoOptionsCOM
NamespaceGrabzIt.Parameters
The class represents all of the options available when creating a video of a webpage.
Public Properties
-
string CustomId - custom identifier that you can pass through to the video webservice. This will be returned with the callback URL you have specified.
-
string CustomWaterMarkId - add custom watermark or special watermark to the video
-
int BrowserWidth - the width of the browser in pixels
- Default: 1366
- Maximum: 10000
-
int BrowserHeight - the height of the browser in pixels
- Default: 1170
- Maximum: 10000
-
int OutputWidth - the width of the resulting video in pixels
- Default: if not set it will match the browser width
- Maximum: Maximum width for package
-
int OutputHeight - the height of the resulting video in pixels
- Default: if not set it will match the browser height
- Maximum: Maximum height for package
-
int Start - the number of milliseconds to wait before creating the video
- Default: 0
- Maximum: 30000
-
string ClickElement - this specifies the HTML element, using a CSS selector to click. Remember a delay may also be required to view the effects of the click
-
string WaitForElement - the CSS selectors of the HTML element in the web page that must be visible before the video is rendered
-
BrowserType RequestAs - the type of user agent you wish to use
-
Country Country - the country in which the web page should be loaded.
-
string ExportURL - the export URL that specifies where the capture should be exported too
-
string EncryptionKey - if a base 64 encoded AES encryption key is specified your capture is encrypted when it is created. It is recommended to use the create encryption key method to create the key and the decrypt methods to decrypt the encrypted capture as shown in this example.
-
bool NoAds - if true adverts should be automatically hidden.
-
bool NoCookieNotifications - if true all commonly found cookie notifications should be automatically hidden.
-
string Address - the URL to execute the HTML code in. Can be useful if the HTML being converted uses relative URL's for resources such as CSS and images.
-
string Proxy - the HTTP proxy details the browser software should use to use to create this capture
-
float FramesPerSecond - the number of frames per second (or screenshots per second) that that should be used when creating the video.
- Default: 10
- Minimum: 0.2
- Maximum: 20
-
int Duration - the length in seconds of the video, this will be how long the web page is captured for.
- Default: 10
- Minimum: 1
- Maximum: 60
Public Methods
-
AddPostParameter(string name, string value) - defines a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force GrabzIt to perform a HTTP post.
- name - the name of the HTTP Post parameter
- value - the value of the HTTP Post parameter
URLToPDF(string url, PDFOptions options)COM
Specifies the URL that should be converted into a PDF.
Parameters
-
url - the URL that the should be converted into a PDF
-
PDFOptions options - a instance of the PDFOptions class that defines any special options to use when creating a PDF.
- Required for COM otherwise optional
Return Value
void
HTMLToPDF(string html, PDFOptions options)COM
Specifies the HTML that should be converted into a PDF.
Parameters
-
html - the HTML to convert into a PDF
-
PDFOptions options - a instance of the GrabzItPDFOptions class that defines any special options to use when creating a PDF.
- Required for COM otherwise optional
Return Value
void
FileToPDF(string path, PDFOptions options)COM
Specifies a HTML file that should be converted into a PDF.
Parameters
-
path - the file path of a HTML file to convert into a PDF
-
PDFOptions options - a instance of the PDFOptions class that defines any special options to use when creating a PDF.
- Required for COM otherwise optional
Return Value
void
PDFOptionsCOM
NamespaceGrabzIt.Parameters
The class represents all of the options available when creating PDF captures.
Public Properties
Public Methods
-
AddPostParameter(string name, string value) - defines a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force GrabzIt to perform a HTTP post.
- name - the name of the HTTP Post parameter
- value - the value of the HTTP Post parameter
-
AddTemplateParameter(string name, string value) - define a custom template parameter and value, this method can be called multiple times to add multiple parameters.
- name - the name of the template parameter
- value - the value of the template parameter
URLToDOCX(string url, DOCXOptions options)COM
Specifies the URL that should be converted into a DOCX.
Parameters
-
url - the URL that the should be converted into a DOCX
-
DOCXOptions options - a instance of the DOCXOptions class that defines any special options to use when creating a DOCX.
- Required for COM otherwise optional
Return Value
void
HTMLToDOCX(string html, DOCXOptions options)COM
Specifies the HTML that should be converted into a DOCX.
Parameters
-
html - the HTML to convert into a DOCX
-
DOCXOptions options - a instance of the GrabzItDOCXOptions class that defines any special options to use when creating a DOCX.
- Required for COM otherwise optional
Return Value
void
FileToDOCX(string path, DOCXOptions options)COM
Specifies a HTML file that should be converted into a DOCX.
Parameters
-
path - the file path of a HTML file to convert into a DOCX
-
DOCXOptions options - a instance of the DOCXOptions class that defines any special options to use when creating a DOCX.
- Required for COM otherwise optional
Return Value
void
DOCXOptionsCOM
NamespaceGrabzIt.Parameters
The class represents all of the options available when creating DOCX captures.
Public Properties
-
string CustomId - a custom identifier that you can pass through to the webservice. This will be returned with the callback URL you have specified.
-
bool IncludeBackground - if true the background images of the web page should be included in the DOCX
-
PageSize PageSize - the page size of the DOCX
-
PageOrientation Orientation - the orientation of the DOCX document
-
bool IncludeLinks - true if links should be included in the DOCX
-
bool IncludeImages - if true the images of the web page should be included in the DOCX
-
string Title - provide a title to the DOCX document
-
int MarginTop - the margin in millimeters that should appear at the top of the DOCX document page
-
int MarginLeft - the margin in millimeters that should appear at the left of the DOCX document page
-
int MarginBottom - the margin in millimeters that should appear at the bottom of the DOCX document page
-
int MarginRight - the margin in millimeters that should appear at the right of the DOCX document
-
int BrowserWidth - the width of the browser in pixels
- Default: 1366
- Maximum: 10000
- Auto Width: -1 (passing -1 means that the width of the browser matches the width of the DOCX document)
-
int PageWidth - the custom width of the resulting DOCX in mm
-
int PageHeight - the custom height of the resulting DOCX in mm
-
int Delay - the number of milliseconds to wait before taking the screenshot
- Default: 0
- Maximum: 30000
-
BrowserType RequestAs - the type of user agent you wish to use
-
string TemplateId - add a template ID that specifies the header and footer of the DOCX document
-
string ClickElement - this specifies the HTML element, using a CSS selector to click. Remember a delay may also be required to view the effects of the click
-
string TargetElement - the CSS selector of the only HTML element on the target web page that is to be turned into a DOCX, all other parts of the web page are ignored. If there are multiple matching HTML elements the first one is chosen
-
string HideElement - the CSS selectors of the one or more HTML elements in the web page to hide, to specify multiple HTML elements to hide seperate each selector with a comma
-
string WaitForElement - the CSS selectors of the HTML element in the web page that must be visible before the capture is performed
-
int Quality - the quality of the returned DOCX. The default uses the recommended quality for the DOCX.
- Reducing the quality will reduce the filesize and reduce download times.
- Default: -1
- Minimum: -1
- Maximum: 100
-
Country Country - the country the screenshot should be taken from.
-
string ExportURL - the export URL that specifies where the capture should be exported too
-
string EncryptionKey - if a base 64 encoded AES encryption key is specified your capture is encrypted when it is created. It is recommended to use the create encryption key method to create the key and the decrypt methods to decrypt the encrypted capture as shown in this example.
-
bool NoAds - if true adverts should be automatically hidden.
-
bool NoCookieNotifications - if true all commonly found cookie notifications should be automatically hidden.
-
string Address - the URL to execute the HTML code in. Can be useful if the HTML being converted uses relative URL's for resources such as CSS and images.
-
string Proxy - the HTTP proxy details the browser software should use to use to create this capture
-
string MergeId - the ID of a capture that should be merged at the beginning of the new DOCX document
-
string Password - the password to protect the DOCX document with
Public Methods
-
AddPostParameter(string name, string value) - defines a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force GrabzIt to perform a HTTP post.
- name - the name of the HTTP Post parameter
- value - the value of the HTTP Post parameter
-
AddTemplateParameter(string name, string value) - define a custom template parameter and value, this method can be called multiple times to add multiple parameters.
- name - the name of the template parameter
- value - the value of the template parameter
URLToTable(string url, TableOptions options)COM
Specifies the URL that the HTML tables should be extracted from.
Parameters
-
url - the URL to extract HTML tables from
-
TableOptions options - a instance of the TableOptions class that defines any special options to use when converting the HTML table.
- Required for COM otherwise optional
Return Value
void
HTMLToTable(string html, TableOptions options)COM
Specifies the HTML that the HTML tables should be extracted from.
Parameters
-
html - the HTML to extract HTML tables from.
-
TableOptions options - a instance of the TableOptions class that defines any special options to use when converting the HTML table.
- Required for COM otherwise optional
Return Value
void
FileToTable(string path, TableOptions options)COM
Specifies a HTML file that the HTML tables should be extracted from.
Parameters
-
path - the file path of a HTML file to extract HTML tables from.
-
TableOptions options - a instance of the TableOptions class that defines any special options to use when converting the HTML table.
- Required for COM otherwise optional
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
-
string CustomId - a custom identifier that you can pass through to the webservice. This will be returned with the callback URL you have specified
-
int TableNumberToInclude - the index of the table to be converted, were all tables in a web page are ordered from the top of the web page to bottom
-
TableFormat Format - the format the table should be in
-
bool IncludeHeaderNames - if true header names will be included in the table
-
bool IncludeAllTables - if true all table on the web page will be extracted with each table appearing in a seperate spreadsheet sheet. Only available with the XLSX format
-
string TargetElement - the id of the only HTML element in the web page that should be used to extract tables from
-
BrowserType RequestAs - the type of user agent you wish to use
-
Country Country - the country the screenshot should be taken from.
-
string ExportURL - the export URL that specifies where the capture should be exported too
-
string EncryptionKey - if a base 64 encoded AES encryption key is specified your capture is encrypted when it is created. It is recommended to use the create encryption key method to create the key and the decrypt methods to decrypt the encrypted capture as shown in this example.
-
string Address - the URL to execute the HTML code in. Can be useful if the HTML being converted uses relative URL's for resources such as CSS and images.
-
string Proxy - the HTTP proxy details the browser software should use to use to create this capture
Public Methods
-
AddPostParameter(string name, string value) - defines a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force GrabzIt to perform a HTTP post.
- name - the name of the HTTP Post parameter
- value - the value of the HTTP Post parameter
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
-
callBackURL - the handler the GrabzIt service should call after it has completed its work
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
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
-
saveToFile - the file path that capture will be saved to once it has been completed
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
-
id - the unique identifier of the screenshot
Return Value
Status object
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
-
domain - the domain to return cookies for
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
-
name - the name of the cookie to set
-
domain - the domain of the website to set the cookie for
- value - the value of the cookie
- path - the website path the cookie relates to
- httponly - if true the cookie can only be used with the HTTP protocol
- expires - defines when the cookie expires. Pass a null value if the cookie should not expire
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
-
name - the name of the cookie to delete
-
domain - the domain of the website to delete the cookie for
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
-
identifier - the identifier of a particular custom watermark you want to view
Return Value
WaterMark
Add a new custom watermark
Parameters
-
identifier - the identifier you want to give the custom watermark. It is important that this identifier is unique.
-
path - the absolute path of the watermark on your server. For instance C:/watermark/1.png
-
xpos - the horizontal position you want the screenshot to appear at
-
ypos - vertical position you want the screenshot to appear at
Return Value
returns true if the watermark was successfully set
DeleteWaterMark(string identifier)COM
DeleteWaterMarkAsync(string identifier)
Delete a custom watermark
Parameters
-
identifier - the identifier of the custom watermark you want to delete
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
-
proxyUrl - the URL, which can include a port if required, of the proxy. Providing a null will remove any previously set proxy
UseSSL(bool value)COM
Specifies if requests to GrabzIt's API should use SSL
Parameters
-
value - if true all requests to GrabzIt's API will use SSL
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
-
id - the unique identifier of the capture
-
outStream - the stream to write the capture to
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.
- bmp8 = 0
- bmp16 = 1
- bmp24 = 2
- bmp = 3
- jpg = 4
- tiff = 5
- png = 6
- webp = 7
BrowserType
NamespaceGrabzIt.Enums
This enum comprises of the following values.
- StandardBrowser = 0
- MobileBrowser = 1
- SearchEngine = 2
Country
NamespaceGrabzIt.Enums
This enum comprises of the following values.
- Default = 0
- Singapore = 1
- UK = 2
- US = 3
PageSize
NamespaceGrabzIt.Enums
This enum comprises of the following values.
- A3 = 0
- A4 = 1
- A5 = 2
- A6 = 3
- B3 = 4
- B4 = 5
- B5 = 6
- B6 = 7
- Legal = 8
- Letter = 9
PageOrientation
NamespaceGrabzIt.Enums
This enum comprises of the following values.
- Landscape = 0
- Portrait = 1
CSSMediaType
NamespaceGrabzIt.Enums
This enum comprises of the following values.
TableFormat
NamespaceGrabzIt.Enums
This enum comprises of the following values.
- csv = 0
- json = 1
- xslx = 2
HorizontalPosition
NamespaceGrabzIt.Enums
This enum comprises of the following values.
- Left = 0
- Center = 1
- Right = 2
VerticalPosition
NamespaceGrabzIt.Enums
This enum comprises of the following values.
- Top = 0
- Middle = 1
- Bottom = 2
Result Classes
GrabzItCookieCOM
NamespaceGrabzIt.Cookies
Public Properties
-
string Name
-
string Value
-
string Domain
- The domain the cookie is set for.
-
string Path
- The path on the domain that this cookie applies to.
-
string HttpOnly
- If this cookie is only valid when the website is viewed with the HTTP protocol.
-
string Expires
- The date this cookie expires
-
string Type
-
The type of cookie this is, which can be one of the following:
- Global - this is a global cookie set by GrabzIt
- Local - this is a local cookie set by you
- Overridden - a global cookie that has been overridden by you
GrabzItFileCOM
NamespaceGrabzIt.Screenshots
Public Methods
-
void Save(string path)
-
path - the path to save the result to
- string ToString()
Public Properties
NamespaceGrabzIt.Screenshots
The class representing the current status of the screenshot.
Public Properties
-
bool Processing
- If true the screenshot is still being processed.
-
bool Cached
- If true the screenshot is has been processed and is currently cached.
-
bool Expired
- If true the screenshot is no longer on the GrabzIt system.
-
string Message
- An error message returned by the system.
WaterMarkCOM
NamespaceGrabzIt.Screenshots
This class represents the custom watermarks stored in GrabzIt
Public Methods
Public Properties
-
string Identifier
- The identifier of the watermark
-
string XPosition
-
The horizontal postion of the watermark
-
string YPosition
-
The vertical postion of the watermark
-
string Format
- The format of the watermark