Skip to content

Commit

Permalink
Apply suggestions from PCX review
Browse files Browse the repository at this point in the history
Co-authored-by: Jun Lee <junlee@cloudflare.com>
  • Loading branch information
pedrosousa and Oxyjun authored Dec 12, 2024
1 parent deec018 commit 20bdf47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/content/docs/browser-rendering/how-to/pdf-generation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default {
Rather than using Browser Rendering to navigate to a user-provided URL, manually generate a webpage, then provide that webpage to the Browser Rendering instance. This allows you to render any design you want.

:::note
You can generate your HTML or CSS using any method you like. This example uses string interpolation, but this method is fully-compatible with web frameworks capable of rendering HTML on Workers such as React, Remix, and Vue.
You can generate your HTML or CSS using any method you like. This example uses string interpolation, but the method is also fully compatible with web frameworks capable of rendering HTML on Workers such as React, Remix, and Vue.
:::

For this example, we're going to take in user-provided content (via a '?name=' parameter), and have that name output in the final PDF document.
Expand Down Expand Up @@ -125,7 +125,7 @@ const generateDocument = (name: string) => {
This example HTML document should render a beige background imitating a certificate showing that the user-provided name has successfully rendered a PDF using Cloudflare Workers.

:::note
It is usually best to avoid directly interpolating user-provided content into an image or PDF renderer in production applications. To render contents like an invoice, it wold be best to validate the data input, and fetch data yourself using tools like [D1](/d1/) or [Workers KV](/kv/).
It is usually best to avoid directly interpolating user-provided content into an image or PDF renderer in production applications. To render contents like an invoice, it would be best to validate the data input and fetch the data yourself using tools like [D1](/d1/) or [Workers KV](/kv/).
:::

## 2. Load HTML and CSS Into Browser
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/spectrum/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Spectrum allows you to route MQTT, email, file transfer, version control, games,
href="https://www.cloudflare.com/plans/"
icon="document"
>
Compare available Cloudflare plans
Compare available Cloudflare plans.
</LinkTitleCard>

</CardGrid>

0 comments on commit 20bdf47

Please sign in to comment.