Comments (13)
Turns out that landed in 65.0.3294.0. I'm making some progress!
from html-pdf-chrome.
I tried setting custom header and footer template parameters using this, but it didn't work. Really would love this feature!
from html-pdf-chrome.
Primarily waiting for Chrome 65 to be promoted to the stable channel.
It looks like that could be as soon as March 6th. https://www.chromium.org/developers/calendar
You can follow my progress here: https://github.com/westy92/html-pdf-chrome/tree/custom-header-footer
from html-pdf-chrome.
@os1r1s110 @Exiliot @mingyugao Chrome 65 became stable today, so I cleaned up my branch. Any thoughts on my PR are welcome! Thank you.
from html-pdf-chrome.
@westy92 Seems pretty good to me for header/footer template as supported by the dev tools! :)
from html-pdf-chrome.
Released in v0.5.0. You're welcome!
from html-pdf-chrome.
This library may help significantly: https://github.com/byuarchdi/print-headers-and-footers
from html-pdf-chrome.
@westy92 The bug, which this library is aimed to fix, is already fixed in Chrome:
It seems that the requested feature is more related to this one bug.
from html-pdf-chrome.
@mingyugao, I think using those new parameters may be our best bet! I started some work here but was unable to get it to work. I made sure to use Chrome 64 but still had issues like the others here: puppeteer/puppeteer#373.
from html-pdf-chrome.
I believe this is the relevant Chrome source: https://cs.chromium.org/chromium/src/components/printing/resources/print_preview_page.html?q=headerTemplate&sq=package:chromium&dr=C&l=69
from html-pdf-chrome.
What would be missing for it to be usable? Only updating the typings definitions or something else?
from html-pdf-chrome.
I plan to do a release in a few hours. Thank you all for your patience!
from html-pdf-chrome.
Thank you for publishing it, it's really nice to work with.
Puppeteer works really well too but don't have a trivial option to run a single instance and reuse it as you do with this package : )
from html-pdf-chrome.
Related Issues (20)
- Migrate from tslint to typescript-eslint
- Promises intermittently not resolved HOT 1
- CSS conic-gradient issue HOT 2
- Error: Cannot find module '/node_modules/html-pdf-chrome/dist/src/index.js'. Please verify that the package.json has a valid "main" entry HOT 2
- Log Handler HOT 1
- PDF with searchable text HOT 2
- Allow Chrome instance to launch on first run and persist for future runs HOT 5
- Editable form field creation HOT 1
- HtmlPdf.create() connection lost HOT 5
- Node.js 17 connect ECONNREFUSED ::1:49497 HOT 1
- Error: Cannot find module "html-pdf-chrome" HOT 3
- Module parse failed: /Users/pro/End/trunk/app/node_modules/html-pdf-chrome/dist/index.js HOT 2
- Page generate fails due to 'using unsafe HTTP verb GET' for new tab HOT 1
- setting up pm2 HOT 4
- Change return type of toStream() to Readable HOT 3
- Fonts are not working Azure DevOps HOT 2
- Consider cli support
- run with javascript and got CDP error HOT 3
- issue while deployed in pm2 linux HOT 2
- Timeout problem w/ external chrome browser
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-pdf-chrome.