Skip to content

Commit 6c04f85

Browse files
authored
Update documentation for new delete feature
1 parent 06ff287 commit 6c04f85

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Api2Pdf.com is a REST API for instantly generating PDF documents from HTML, URLs
77
- [Resources](#resources)
88
- [Authorization](#authorization)
99
- [Usage](#usage)
10+
- [Helper Methods](#helper-methods)
1011
- [FAQ](https://www.api2pdf.com/faq)
1112

12-
1313
## <a name="installation"></a>Installation
1414

1515
Add this repository to your Composer file:
@@ -224,3 +224,17 @@ To use the merge endpoint, supply a list of URLs to existing PDFs. The engine wi
224224
$linksToPdfs = ['https://LINK-TO-PDF', 'https://LINK-TO-PDF'];
225225
$mergeResult = $apiClient->merge($linksToPdfs)
226226

227+
---
228+
229+
## <a name="helper-methods"></a>Helper Methods
230+
231+
**delete($responseId)**
232+
233+
By default, Api2Pdf deletes your PDFs 24 hours after they have been generated. For developers who require higher levels of security and wish to delete their PDFs can make a DELETE request API call by using the `responseId` retrieved from the original request.
234+
235+
$result = $apiClient->headlessChromeFromHtml("<p>Hello World</p>");
236+
$responseId = $result->getResponseId();
237+
//delete pdf
238+
$apiClient->delete($responseId);
239+
240+

0 commit comments

Comments
 (0)