Skip to content

Commit 1dca449

Browse files
authored
updated documentation to reflect delete
1 parent 44e8cc1 commit 1dca449

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,16 @@ To use the merge endpoint, supply a list of urls to existing PDFs. The engine wi
167167

168168
## <a name="helpers"></a>Helper Methods
169169

170+
**Api2PdfResponse Delete(string responseId)**
171+
172+
By default, Api2Pdf will delete your PDF 24 hours after it has been generated. For those with high security needs, you may want to delete your PDF on command. You can do so by making an DELETE api call with the `responseId` attribute that was returned on the original JSON payload.
173+
174+
var a2pClient = Api2Pdf("YOUR-API-KEY");
175+
var apiResponse = a2pClient.HeadlessChrome.FromHtml("<p>Hello World</p>");
176+
var responseId = apiResponse.ResponseId;
177+
//delete PDF
178+
a2pClient.Delete(responseId);
179+
170180
**void Api2PdfResponse.SavePdf(string localPath)**
171181

172182
On any `Api2PdfResponse` that succesfully generated a pdf, you can use the handy `SavePdf(string localPdf)` method to download the pdf to a local cache.

0 commit comments

Comments
 (0)