File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,22 @@ static void Main(string[] args)
6262
6363 Console . WriteLine ( $ "Chrome URL to PDF: { result . FileUrl } ") ;
6464
65+ //Chrome - HTML to Image
66+ result = a2pClient . Chrome . HtmlToImage ( new ChromeHtmlToImageRequest
67+ {
68+ Html = sampleHtml
69+ } ) ;
70+
71+ Console . WriteLine ( $ "Chrome HTML to Image: { result . FileUrl } ") ;
72+
73+ //Chrome - URL to Image
74+ result = a2pClient . Chrome . UrlToImage ( new ChromeUrlToImageRequest
75+ {
76+ Url = "https://www.api2pdf.com"
77+ } ) ;
78+
79+ Console . WriteLine ( $ "Chrome Url to Image: { result . FileUrl } ") ;
80+
6581 //Wkhtml
6682
6783 //Wkhtml - HTML to PDF
Original file line number Diff line number Diff line change @@ -179,6 +179,23 @@ An `Api2PdfResult` object is returned from every API call. If a call is unsucces
179179 Options = options
180180 };
181181 var apiResponse = a2pClient.Chrome.UrlToPdf(request);
182+
183+
184+ ** Convert HTML to Image or HTML to PNG**
185+
186+ var request = new ChromeHtmlToImageRequest
187+ {
188+ Html = "<p>Hello World</p>"
189+ };
190+ var apiResponse = a2pClient.Chrome.HtmlToImage(request);
191+
192+ ** Convert URL to Image or URL to PNG**
193+
194+ var request = new ChromeUrlToImageRequest
195+ {
196+ Url = "https://www.api2pdf.com"
197+ };
198+ var apiResponse = a2pClient.Chrome.UrlToImage(request);
182199
183200---
184201
You can’t perform that action at this time.
0 commit comments