import mql from '@microlink/mql' const { data } = await mql('https://rauchg.com/2014/7-principles-of-rich-web-applications', { pdf: true })
Type: <boolean>
Default: false
Default: false
It generates a PDF over the target url.
When it's enabled, a new
pdf
data field will be part of the response payload.import mql from '@microlink/mql' const { data } = await mql('https://rauchg.com/2014/7-principles-of-rich-web-applications', { pdf: true, scale: 1, margin: "0.4cm" })
Also, combine it with embed for inserting it as HTML markup and refresh it asynchronously in the background (known as stale).
When you generate a PDF, the default mediaType is
'print'
.