The Download URL is empty

When you create a document, if you don't specify any status, it will have a status of draft. I you want to generate the document, update its status to pending. You can also create the document directly with a pending status to generate the document upon creation.

The document is then queued for generation.

Once its generation is complete, the document status will either be changed to success or failure. When the status is success the download_url will be filled.

Don't use preview_url

The preview_url attribute is not a download URL. Its only purpose is to show a preview of the Document (hence the "preview" in its name). This is useful if you want to show a draft version of the Document before you actually generate it.

A good example of using preview_url is PDFMonkey's dashboard itself. When you create a Document, it starts as a draft you can preview. You can change the Document data as many times as you want until you're ready to generate it. The preview on the right is what's returned by preview_url.

Last updated