Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
adonis-pdf
Advanced tools
Service provider for building PDFs using pdfmake.
npm i adonis-pdf
or yarn add adonis-pdf
config/pdf.js
and set any custom fonts you wish to use:module.exports = {
fontDescriptors: {
// my fonts here
}
}
'adonis-pdf/providers/PdfProvider'
to the providers
array within start/app.js
Add const PDF = use('PDF')
to whatever file you wish to use it, then call PDF.create()
. This method accepts two parameters:
definition
: Object representing the PDF content/styles etcstream
: A Readable or Writeable Stream the PDF will be piped to'use strict'
const PDF = use('PDF')
class MyController {
async generatePdf ({ response }) {
const definition = {
content: [
{
text: 'test',
style: 'header'
}
],
styles: {
header: {
fontSize: 22,
bold: true
}
}
}
PDF.create(definition, response.response)
return response
}
}
FAQs
Create PDF files within Adonis using pdfmake
The npm package adonis-pdf receives a total of 10 weekly downloads. As such, adonis-pdf popularity was classified as not popular.
We found that adonis-pdf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.