Comments (2)
It seems to be working fine for me:
Source:
const html = `
<html>
<head>
<title>TITLE</title>
</head>
<body>
<div style="page-break-after:always">P1</div>
<div style="page-break-after:always">P2</div>
<div>P3</div>
</body>
</html>
`;
const result = await HtmlPdf.create(html, {
port,
printOptions: {
displayHeaderFooter: true,
headerTemplate: `
<div class="text center" style="font-family:Dana">
سلام <span class="pageNumber" style="font-family:Iransans; color:red; direction:ltr"></span> / <span class="totalPages" style="font-family:tahoma"></span>
</div>
`,
footerTemplate: '<div class="text center" style="color:green">Custom <i>footer</i>!</div>',
},
});
result.toFile('test.pdf');
Resulting file: test.pdf
Using: Chrome 89 on macOS 11.2.3
from html-pdf-chrome.
Closing due to no customer response. If you continue to see this issue, please comment here with some sample code to reproduce it! Thank you.
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.