Open NJJ2 opened 6 years ago
AFAIK that is not possible. This uses PhantomJS which is a native headless WebKit binary.
getting same issue
ERROR in ./~/html-pdf/lib/pdf.js Module not found: Error: Can't resolve 'child_process' in 'C:\Users\admin\Desktop**\node_modules\html-pdf\lib' @ ./~/html-pdf/lib/pdf.js 2:19-43 @ ./~/html-pdf/lib/index.js @ ./src/app/.ts @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
ERROR in ./~/phantomjs-prebuilt/lib/phantomjs.js Module not found: Error: Can't resolve 'child_process' in 'C:\Users\admin\Desktop****\node_modules\phantomjs-prebuilt\lib' @ ./~/phantomjs-prebuilt/lib/phantomjs.js 10:12-36 @ ./~/html-pdf/lib/pdf.js @ ./~/html-pdf/lib/index.js @ ./src/app/.ts @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
Hi,
Basically, I need to save html page into pdf. Currently, I'm using this package in server side with nodejs. but creating in server side and downloading that in client side is too time consuming ( around 1min). now I planing to do it completly client side with Angular 2 with typescript. but when I compile project with ng serve I'm getting forllowing error
Someone please give some suggetstion to get it work in angular 2 projects.