1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "documents": [{
9 "fileName": "sample-report",
10 "markdown": """# Weekly Report
11
12Generated with **Markdown & HTML to PDF**.
13
14| Item | Qty | Price |
15| --- | ---: | ---: |
16| Widgets | 3 | $12.00 |
17| Gadgets | 1 | $4.50 |
18
19- [x] Tables, lists and task lists
20- [x] Code blocks with highlighting
21- [ ] Your content here
22
23```js
24console.log('Hello PDF');
25```
26
27> Tip: set `format`, `landscape` and `pageNumbers` to control the layout.""",
28 }] }
29
30
31run = client.actor("bigaceboy/markdown-html-to-pdf").call(run_input=run_input)
32
33
34print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
35for item in client.dataset(run.default_dataset_id).iterate_items():
36 print(item)
37
38