Giter VIP home page Giter VIP logo

Comments (12)

privateOmega avatar privateOmega commented on July 1, 2024 2

@jyotisonghare @mahendra119 Released v1.1.33 now. Closing this issue.

from html-to-docx.

mahendra119 avatar mahendra119 commented on July 1, 2024 1

Thanks @privateOmega
We are excited about the release of the new version.

from html-to-docx.

mahendra119 avatar mahendra119 commented on July 1, 2024 1

Thank you very much @privateOmega. You have saved us a lot of time.

from html-to-docx.

privateOmega avatar privateOmega commented on July 1, 2024

@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.

jyotisonghare avatar jyotisonghare commented on July 1, 2024

@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.

privateOmega avatar privateOmega commented on July 1, 2024

@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.

jyotisonghare avatar jyotisonghare commented on July 1, 2024

@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.

jyotisonghare avatar jyotisonghare commented on July 1, 2024

@privateOmega , we are waiting for your response.

Thanks,
Jyoti

from html-to-docx.

privateOmega avatar privateOmega commented on July 1, 2024

@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.

privateOmega avatar privateOmega commented on July 1, 2024

PR is merged for now, will release a new version by tomorrow after testing.

from html-to-docx.

mahendra119 avatar mahendra119 commented on July 1, 2024

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.

jyotisonghare avatar jyotisonghare commented on July 1, 2024

@privateOmega Thank you very much.

from html-to-docx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.