
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
front-pdf is a self-hosted service that uses front-end layouts for PDF export. You can create pdf oriented layouts using any front-end technology that you like. Just prepare the front-end build and configure the service.
Your front-end build should contain wrapper with PAGE_CLASS, each page should have its fixed dimentions.
You should tell the service, when your renedering process is finished for all pages by adding the RENDERED_CHART_CLASS in the end.
We are working on improvement of this conventions in future.
This is a draft version of the package.
npm installnpm run start it will run the service (on 5000 port by default)http://localhost:{port}?&id=${id}/json?id={id}, they will recieve all the required data, that was sent in body requestRENDERED_CHART_CLASS classname, so the service will now, that it can make a pdf from your pageconst path = require('path');
const startService = require('front-pdf');
// start the service
startService({
templates: [
{
name: 'template1',
static: path.join(__dirname, '/../static/template1'),
index: path.join(__dirname, '/../static/template1/index.html')
},
{
name: 'template2',
static: path.join(__dirname, '/../static/template2'),
index: path.join(__dirname, '/../static/template2/index.html')
}
],
payloadMock: mock,
port: 5000,
layoutConfig: {
PAGE_HORIZONTAL_PADDING: 42.7,
PAGE_VERTICAL_PADDING: 42.7,
PAGE_INNER_WIDTH: 1180,
PAGE_INNER_HEIGHT: 1704,
PAGE_CLASS: 'pdf-page',
RENDERED_CHART_CLASS: 'analysis-chart-rendered'
},
headless: true
});
FAQs
Application for creating PDF from frontend assets
We found that front-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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.