Comments (11)
Implemented for version 0.4.2 (only in Github, soon also for npm after finishing to implement more features).
As for page numbers (and more field objects), coming soon.
from officegen.
I started to investigate it back then.
On Fri, Feb 20, 2015 at 1:27 AM, Jeff Fairley [email protected]
wrote:
It would be great to build headers and footers into a word document. It
looks like the xml syntax is the same if not restricted, except there's
"header1.xml" and "footer1.xml" in addition to "document.xml". Thoughts?—
Reply to this email directly or view it on GitHub
#52.
from officegen.
I have a change in progress, though admittedly, I chose to omit the options for now.
I'm on the fence on one issue. In a footer there's typically something left-aligned and something right-aligned (and sometimes something center-aligned). I didn't see how to do that with the existing patterns you've implemented, so I was considering building in three functions -- one to take left-aligned text, one to take centered text, and one to take right-aligned text.
Maybe something like this.
var report = officegen({
type: 'docx',
title: 'Delivery Schedule'
});
report.getHeader().setTextLeft('header-left');
report.getHeader().setTextCenter('header-center');
report.getHeader().setTextRight('header-right');
report.getFooter().setTextLeft('left');
report.getFooter().setTextCenter('center');
report.getFooter().setTextRight('right');
What are your thoughts on this?
from officegen.
Yes, sounds like a good plan.
On Tue, Feb 24, 2015 at 11:13 PM, Jeff Fairley [email protected]
wrote:
I have a change in progress, though admittedly, I chose to omit the
options for now.I'm on the fence on one issue. In a footer there's typically something
left-aligned and something right-aligned (and sometimes something
center-aligned). I didn't see how to do that with the existing patterns
you've implemented, so I was considering building in three functions -- one
to take left-aligned text, one to take centered text, and one to take
right-aligned text.Maybe something like this.
var report = officegen({ type: 'docx', title: 'Delivery Schedule' }); report.getHeader().setTextLeft('header-left'); report.getHeader().setTextCenter('header-center'); report.getHeader().setTextRight('header-right'); report.getFooter().setTextLeft('left'); report.getFooter().setTextCenter('center'); report.getFooter().setTextRight('right');
What are your thoughts on this?
—
Reply to this email directly or view it on GitHub
#52 (comment).
from officegen.
Sorry for the delay. Just letting you know this is still on my task list. I had an issue with spacing, then got pulled away to another issue. Definitely gonna come back to finish this thought.
from officegen.
i can't use headers in docx as jfairley said. In my project i have to generate a report which may be in pdf or word. I have done with pdf. but not on word(docx). I need to done generating docx file that should contains,
1.header with logo img on the top right corner.
2. in the body of docx, have to generate a html table with external css. The content of the html is varied depends on the user selection from client side.
3. Footer with page number.
Need your help to do this. Hope you will...
Thanks..
from officegen.
Hi jfairley,
Can you please place your code here to know more about this. I'm interested in your way of building headers and footers. Please, do let me know once you completed this module. I'm looking out for your release.
from officegen.
@Ziv-Barber. I said I would finish this, and I never got around to it. Sorry. I put what I have in PR: #67. It definitely works, but my attempts to build in alignment gutters wasn't coming out right. (Everything comes out left-aligned for me.)
@nanthak, I hope it is helpful for you.
from officegen.
Thank you jfairley. You have a done a great job. I have one more issue is that i can't create a table with this. even i have a addCell() method, my table won't be appeared properly. I will show my output in the following image.
from officegen.
so is this feature available if i install from npm?
from officegen.
Header and footer coming soon. I already implemented most of it.
from officegen.
Related Issues (20)
- How to set the first line indentation for a paragraph in word?
- Can i remove Header and Footer from First page ( Title Page ) and some more queries
- Why does the table fill color not work?
- Cannot generate word file in render process for one Electron app
- How to add repeat header in table docx
- How to insert image into tableceil in docx
- how to open a word document ?
- Is addImage with svg supported for pptx file?
- How to assign color property to newline in table cell in word document ?
- 如何将word转换html,html里面的style css可以转换?
- Embedded File is still being accessed by createReadStream asynchronously even after deletion in officegen for Word Document
- Make the generated document read-only of password protected?
- Can I set a password to access Word
- How to add Number Bullet lists and Sub Number Bullet list
- How can i set auto-warp attribute to a column or cell in Excel file?
- Suggestion:Footer supports inserting tables
- May I ask if it is possible to add a background color to the Word document
- Can a transformation map be created with this library?
- How to Add Subscripts to Table Cells?
- does officegen for docx supports adding shapes ?
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 officegen.