📔Best practices
The best practices to render a good & fast PDF.
Beautify your HTML before triggering the API
This would decrease your request time down, so eventually you could get the PDF file faster. Our servers will render faster with the optimized content as well.
Put CSS Styles in your HTML Content
To avoid any error occurring, you should your CSS Styles in the HTML Content, ideally:
Make sure your included files are accessible & fast to access
You can include remote URLs in your HTML Content, including images, fonts, etc.
Make sure to use CDN storage with a Good connection, otherwise, your PDF will be slow to render.
Popular CDN for fonts:
Google Fonts
CDNFonts
Popular CDN Storage for assets:
AWS S3
Google Cloud Storage
BunnyCDN (cheap & affordable)
Akamai (enterprise)
etc
Define your page's size
It is recommended to always send us your page's size (width & height) so that it can be printable on various papers.
Popular paper sizes:
Letter
- 8.5 x 11 (default of RenderPDF.io)Legal
- 8.5 x 14Tabloid
- 11 x 17Ledger
- 17 x 11A0
- 33.1 x 46.8A1
- 23.4 x 33.1A2
- 16.54 x 23.4A3
- 11.7 x 16.54A4
- 8.27 x 11.7A5
- 5.83 x 8.27A6
- 4.13 x 5.83
Last updated