DocRaptor Home

PDF Styling & Reference

Advanced Topics > Typekit &

Step 1: Add a domain to Typekit kit or project

You’ll need to add any domain you want to use to create a PDF with Typekit fonts to your kit settings, or the project. This is the referrer that Typekit/ expects to find to apply the fonts from your kit correctly. For example, here’s how we’ve set this to use Myriad Pro on DocRaptor on Typekit:

Step 2: Enable JavaScript in your DocRaptor API Request

Next, you’ll need to set javascript to true when making your POST request. Since your Typekit fonts are loaded with JavaScript, DocRaptor can’t actually apply them correctly without enabling JavaScript.

Step 3: Set the referrer in your DocRaptor API Request

You can use Typekit/ with DocRaptor using both document_content and document_url. If you use document_url , the URL you provide must match the domain you defined in Typekit/ in Step 1.

If you use document_content , you must set the referrer API parameter to a URL that uses the domain you defined in Typekit in step 1.

That's it! Please contact us if you encounter any issues!

Ready to get started? Try DocRaptor for free with unlimited test documents.