Skip to content

Commit 8fb17e2

Browse files
authored
Update pdf-endpoint.mdx
rearrange and change titles
1 parent 2b329ff commit 8fb17e2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/content/docs/browser-rendering/rest-api/pdf-endpoint.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,9 @@ curl -X POST https://api.cloudflare.com/client/v4/accounts/<acccountID>/browser-
138138
--output "cloudflare.pdf"
139139
```
140140

141-
<Render
142-
file="setting-custom-user-agent"
143-
product="browser-rendering"
144-
/>
145-
146-
### Generate a PDF with custom header and footer
141+
### Customize page headers and footers
147142

148-
You can customize page headers and footers with HTML templates using the headerTemplate and footerTemplate options. Enable displayHeaderFooter to include them in your output. This example generates an A5 PDF with a branded header, a footer message, and page numbering.
143+
You can customize page headers and footers with HTML templates using the `headerTemplate` and `footerTemplate` options. Enable `displayHeaderFooter` to include them in your output. This example generates an A5 PDF with a branded header, a footer message, and page numbering.
149144

150145
```bash
151146
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/pdf' \
@@ -167,7 +162,7 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
167162
--output "header-footer.pdf"
168163
```
169164

170-
### Generate a PDF with page numbers and metadata
165+
### Include dynamic placeholders from page metadata
171166

172167
You can include dynamic placeholders such as title, date, pageNumber, and totalPages in the header or footer to display metadata on each page. This example produces an A4 PDF with a company-branded header, current date and title, and page numbering in the footer.
173168

@@ -194,6 +189,11 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
194189
},
195190
"timeout": 30000
196191
}
192+
193+
<Render
194+
file="setting-custom-user-agent"
195+
product="browser-rendering"
196+
/>
197197
}' \
198198
--output "paginated.pdf"
199199
```

0 commit comments

Comments
 (0)