![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@magneds/hapi-plugin-pdf
Advanced tools
Create a PDF file from any web page
$ npm install --save @magneds/hapi-plugin-pdf
As the name might have suggested already, this package is a plugin for the Hapi framework, simply registering the package as plugin will suffice.
@magneds/hapi-server
const HapiServer = require('@magneds/node-hapi-server');
const HapiPluginPDF = require('@magneds/hapi-plugin-pdf');
new HapiServer()
.configure({ host: 'localhost', port: 3000 })
.plugin(HapiPluginPDF)
.start()
.then(() => console.log(`Running @${server.info.uri}`));
hapi
const Hapi = require('hapi');
const HapiPluginPDF = require('@magneds/hapi-plugin-pdf');
const server = Hapi.server({ host: 'localhost', port: 3000 });
const init = async () => {
await server.register(HapiPluginPDF);
await server.start();
console.log(`Running @${server.info.uri}`);
};
init();
The pdf plugins registers a single route and works with both the GET
and POST
request methods.
/pdf/render
The request is delegated to the provided url using the method used to call the /pdf/render
endpoint, any GET and/or POST parameter as well as all headers are added to the delegated request.
A GET request only requires a (properly encoded) url
parameter, which contains the url to the web page to render as PDF.
Any header provided will be provided to the final destination.
Like the GET request, a POST request also only requires the url
parameter, which may be provided in either the payload (body) or as parameter to the url.
All headers and payload data will be provided to the final destination.
The '/pdf' portion of the route is a so-called route prefix, it can be changed to whatever you'd like during registration to Hapi by specifying an alternative.
@magneds/hapi-server
//...
// rename the /pdf/render path to /my-custom/pdf/render
.plugin({ ...HapiPluginPDF, routes: { prefix: '/my-custom/pdf' } })
//..
hapi
//...
// rename the /pdf/render path to /my-custom/pdf/render
await server.register({ ...HapiPluginPDF, routes: { prefix: '/my-custom/pdf' } });
//...
};
init();
Please see Changelog
$ npm test
Please see Contributing
The MIT License (MIT). Please see License File for more information.
FAQs
Hapi plugin to create PDF's from webpages
We found that @magneds/hapi-plugin-pdf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.