Class PersistentThreadLocalChromeClient
This is A wrapper of LocalChromeClient That force to invoke any chrome interop as a single persistent thread
Useful for macOS, because CEF initialize and CEF function (render) in macOS required the same thread.
Inheritance
System.Object
PersistentThreadLocalChromeClient
Implements
System.IDisposable
Assembly: IronPdf.dll
Syntax
public class PersistentThreadLocalChromeClient : Object, IChromeClient, IDisposable
Constructors
PersistentThreadLocalChromeClient()
Declaration
public PersistentThreadLocalChromeClient()
Methods
Declaration
public void AddHtmlHeadersAndFooters(IDocumentId id, string owner_password, string user_password, ChromePdfRenderOptions Options, List<int> pages, string url, string htmlTitle, string pdfTitle)
Parameters
Type |
Name |
Description |
IronSoftware.IDocumentId |
id |
|
System.String |
owner_password |
|
System.String |
user_password |
|
ChromePdfRenderOptions |
Options |
|
System.Collections.Generic.List<System.Int32> |
pages |
|
System.String |
url |
|
System.String |
htmlTitle |
|
System.String |
pdfTitle |
|
AddStamp(IDocumentId, String, String, Stamper, IEnumerable<IPdfPage>)
Declaration
public void AddStamp(IDocumentId id, string owner_password, string user_password, Stamper Stamper, IEnumerable<IPdfPage> pages)
Parameters
Type |
Name |
Description |
IronSoftware.IDocumentId |
id |
|
System.String |
owner_password |
|
System.String |
user_password |
|
Stamper |
Stamper |
|
System.Collections.Generic.IEnumerable<IPdfPage> |
pages |
|
ApplyCookies(String, Dictionary<String, String>)
Declaration
public void ApplyCookies(string url, Dictionary<string, string> cookies)
Parameters
Type |
Name |
Description |
System.String |
url |
|
System.Collections.Generic.Dictionary<System.String, System.String> |
cookies |
|
ClearCookies()
Declaration
public void ClearCookies()
Dispose()
stop the persistent thread
Declaration
MeasureHTML(String, Uri, String, ChromePdfRenderOptions)
Declaration
public Size MeasureHTML(string html, Uri BaseUrl, string Proxy, ChromePdfRenderOptions RenderingOptions)
Parameters
Type |
Name |
Description |
System.String |
html |
|
System.Uri |
BaseUrl |
|
System.String |
Proxy |
|
ChromePdfRenderOptions |
RenderingOptions |
|
Returns
Type |
Description |
SixLabors.ImageSharp.Size |
|
RenderPDFFromFile(ChromePdfRenderOptions, ChromeHttpLoginCredentials, String)
Declaration
public IDocumentId RenderPDFFromFile(ChromePdfRenderOptions RenderingOptions, ChromeHttpLoginCredentials LoginCredentials, string filePath)
Parameters
Returns
Type |
Description |
IronSoftware.IDocumentId |
|
RenderPDFFromHTML(String, Uri, String, ChromePdfRenderOptions, ChromeHttpLoginCredentials)
Declaration
public IDocumentId RenderPDFFromHTML(string html, Uri BaseUrl, string Proxy, ChromePdfRenderOptions RenderingOptions, ChromeHttpLoginCredentials LoginCredentials)
Parameters
Returns
Type |
Description |
IronSoftware.IDocumentId |
|
RenderPDFFromImages(List<String>, IEnumerable<(Byte[], String)>, ImageBehavior, ChromePdfRenderOptions)
Declaration
public IDocumentId RenderPDFFromImages(List<string> image_paths, IEnumerable<(byte[], string)> images, ImageBehavior behavior, ChromePdfRenderOptions RenderingOptions)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.String> |
image_paths |
|
System.Collections.Generic.IEnumerable<System.ValueTuple<System.Byte[], System.String>> |
images |
|
ImageBehavior |
behavior |
|
ChromePdfRenderOptions |
RenderingOptions |
|
Returns
Type |
Description |
IronSoftware.IDocumentId |
|
RenderPDFFromURI(Uri, ChromePdfRenderOptions, ChromeHttpLoginCredentials)
Declaration
public IDocumentId RenderPDFFromURI(Uri uri, ChromePdfRenderOptions RenderingOptions, ChromeHttpLoginCredentials LoginCredentials)
Parameters
Returns
Type |
Description |
IronSoftware.IDocumentId |
|
RenderPDFFromZIP(Byte[], String, ChromePdfRenderOptions, ChromeHttpLoginCredentials)
Declaration
public IDocumentId RenderPDFFromZIP(byte[] bytes, string mainFile, ChromePdfRenderOptions RenderingOptions, ChromeHttpLoginCredentials LoginCredentials)
Parameters
Returns
Type |
Description |
IronSoftware.IDocumentId |
|
Implements
System.IDisposable