Comments (12)
@jyotisonghare @mahendra119 Released v1.1.33 now. Closing this issue.
from html-to-docx.
Thanks @privateOmega
We are excited about the release of the new version.
from html-to-docx.
Thank you very much @privateOmega. You have saved us a lot of time.
from html-to-docx.
@jyotisonghare At present concept of cover page or skipping headers and footers for the first page isn't something that I have explored.
Which attributes have you checked so far? And I sincerely hope, the attributes you were checking out were in OOXML context and not the options of html-to-docx. If not, I would suggest checking out headers and footers in OOXML standards, this PDF is for the first edition of that and you could create a PR with a branch from develop for addressing that feature and I could probably support you through it.
from html-to-docx.
@privateOmega , thanks for your response.
We are creating docx using HTML content. We have to only remove header and footer from first page i.e. our cover page, for that I have used - headerType attribute however 'even' and 'first' values are not working only default value work's.
Adding the below code for your reference:
const fileBuffer = await HTMLtoDOCX(htmlData, headerString, {
table: { row: { cantSplit: true } },
header: true,
footer: true,
pageNumber: true,
font: 'Nunito',
headerType:'even'
}, footerString);
Also can you please suggest how can we add the custom CSS for header & footer, where header consist of ( PROJECT NAME + LOGO).
from html-to-docx.
@jyotisonghare I have added a PR for this.
Well custom CSS for header and footer is written in the same way as the document only, inline styles. You could use package like juice in case you want to inline the styles from a css file in your application.
from html-to-docx.
@privateOmega , I have added your PR code into existing package and pass parameter. However it is not working for me would you please correct me where I am doing wrong or please let me know how do I pull your current code
const fileBuffer = await HTMLtoDOCX(htmlString, '
Header Text Goes Here
', {title: 'Cover page issue',
headerType: 'default',
header: true,
footerType: 'default',
footer: true,
font: 'Nunito',
fontSize: 22,
complexScriptFontSize: 22,
table: {
row: {
cantSplit: true,
},
},
pageNumber: true,
skipFirstHeaderFooter: true,
} , '
Footer Text Goes Here
');from html-to-docx.
@privateOmega , we are waiting for your response.
Thanks,
Jyoti
from html-to-docx.
@jyotisonghare Could you please post the html-to-docx entry in dependencies of your package.json?
I am assuming you are still using the version from npm, which doesn't have this change yet because it hasn't been merged, so inorder to access it, you should be doing npm i git://github.com/privateOmega/html-to-docx#feature/skip-first-header
for now, when I release a new version, you would be getting it from npm i html-to-docx
from html-to-docx.
PR is merged for now, will release a new version by tomorrow after testing.
from html-to-docx.
Hi @privateOmega
Any Updates for the new version release with this fix?
I also tried npm i git://github.com/privateOmega/html-to-docx#feature/skip-first-header, but no dist/code folder present after install.
from html-to-docx.
@privateOmega Thank you very much.
from html-to-docx.
Related Issues (20)
- minifyHTMLString is not a function
- Lang / time new roman font is not working
- feature: 2 Columns in page
- style改变字体,数字变了,中文还是Times New Roman
- support for line breaks like <br> tag HOT 2
- imgs with src as base64 do not come over
- Is width = 100% achievable?
- How to resize images - is it possible?
- Images & style doesn't apply well in .docx file HOT 4
- html to docx conversion raise an error when it transform a table with merged cell
- Margins don't work
- ADD page break if content doesn't have enough room
- XML error when using with Vite (React or Vue)
- browser webpack error
- How to preserve border-bottom without table
- Refactoring work done HOT 4
- bug: when an image is nested under spans, xml-builder doesn't pick up the img tag
- README.md does not show how to load the HTMLtoDOCX function HOT 2
- Nested formatting tags are not getting applied
- STRIKE THROUGH Not working HOT 3
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-to-docx.