You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-6
Original file line number
Diff line number
Diff line change
@@ -8,22 +8,39 @@ It is intended to be a DIY docraptor of sorts.
8
8
9
9
Simply build the docker image, deploy it to AWS, then invoke the lambda with an event body JSON that performs the desired operation. For example: `{"document_content": "<h1>Hello, World!</h1>"}`
10
10
11
-
## Ways of invoking splat
11
+
This can be done via a function_url, apigateway or lambda invoke.
12
+
13
+
## Invoking splat
14
+
15
+
Event payload body.
16
+
17
+
|Field | Type| Description|
18
+
|---|---|---|
19
+
|**javascript (princexml)**| boolean (False) | Enables [princeXML's javascript execution](https://www.princexml.com/doc/javascript/). This will not render react but can be used for formatting. |
20
+
|**check_license**| boolean (False) | Send this field to receive a check on remaining license usage |
21
+
|**document_content**| string | Embed the html content in the payload. There will be AWS payload size limitations.|
22
+
|**document_url**| url | Fetch the html content from `document_url` to disk before rendering.|
23
+
|**browser_url**| url | Browser the `browser_url` with `playwright` before rendering with `renderer`|
24
+
|**browser_headers**| Mapping[str,str]| Add additional headers to playwright before visiting `browser_url`|
25
+
|**renderer**|`princexml` or `playwright`| Renderer to render the html with |
26
+
|**bucket_name**| string | Output the resulting pdf to `s3://{bucket_name}/{uuid}.pdf`. The lambda will require permission to upload to the bucket. The response will include `bucket`, `key`, `presigned_url`|
27
+
|**presigned_url**| url | Output the resulting pdf to the presigned url. Generate the presigned url with `put_object`. See Output for more information.|
12
28
13
29
### Input
14
30
15
31
Pass content in event: `{"document_content": "<h1>Hello, World!</h1>"}`
16
-
Pass content via URL: `{"doucment_url": "<h1>Hello, World!</h1>"}`
32
+
33
+
Pass content via URL: `{"document_url": "https://some_page/report.html"}`
0 commit comments