How to create pdf documents with node js
up vote
0
down vote
favorite
I have a letter saved as word document that i currently fill with certain fields for each user i have in my system. I do this manually and then save it as a pdf before sending it in an email.
I am developing a MEAN stack app that can send emails etc and store all the users for my system, and now want to start generating these letters at the backend automatically. The options I have come across so far would be creating pdf or templates using npm Javascript libraries or html. This is fine if i have one doc but if i plan on having more in the future, creating this template for each doc is quite time consuming. Is there a way in node to open a word doc replace place holders and then save as a pdf or something similar, so that i could use word to create templates rather than hard coding templates. (or any other interesting solution for that matter).
javascript node.js ms-word mean-stack
add a comment |
up vote
0
down vote
favorite
I have a letter saved as word document that i currently fill with certain fields for each user i have in my system. I do this manually and then save it as a pdf before sending it in an email.
I am developing a MEAN stack app that can send emails etc and store all the users for my system, and now want to start generating these letters at the backend automatically. The options I have come across so far would be creating pdf or templates using npm Javascript libraries or html. This is fine if i have one doc but if i plan on having more in the future, creating this template for each doc is quite time consuming. Is there a way in node to open a word doc replace place holders and then save as a pdf or something similar, so that i could use word to create templates rather than hard coding templates. (or any other interesting solution for that matter).
javascript node.js ms-word mean-stack
Your question is actually hiding a second, which is "how do you read a word doc?". I think this was downvoted because the question is so vague that it can probably be answered with "go find a lib for reading word docs and another for writing pdfs."
– unflores
Nov 22 at 13:51
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a letter saved as word document that i currently fill with certain fields for each user i have in my system. I do this manually and then save it as a pdf before sending it in an email.
I am developing a MEAN stack app that can send emails etc and store all the users for my system, and now want to start generating these letters at the backend automatically. The options I have come across so far would be creating pdf or templates using npm Javascript libraries or html. This is fine if i have one doc but if i plan on having more in the future, creating this template for each doc is quite time consuming. Is there a way in node to open a word doc replace place holders and then save as a pdf or something similar, so that i could use word to create templates rather than hard coding templates. (or any other interesting solution for that matter).
javascript node.js ms-word mean-stack
I have a letter saved as word document that i currently fill with certain fields for each user i have in my system. I do this manually and then save it as a pdf before sending it in an email.
I am developing a MEAN stack app that can send emails etc and store all the users for my system, and now want to start generating these letters at the backend automatically. The options I have come across so far would be creating pdf or templates using npm Javascript libraries or html. This is fine if i have one doc but if i plan on having more in the future, creating this template for each doc is quite time consuming. Is there a way in node to open a word doc replace place holders and then save as a pdf or something similar, so that i could use word to create templates rather than hard coding templates. (or any other interesting solution for that matter).
javascript node.js ms-word mean-stack
javascript node.js ms-word mean-stack
asked Nov 22 at 12:37
Arthur Le Calvez
89111
89111
Your question is actually hiding a second, which is "how do you read a word doc?". I think this was downvoted because the question is so vague that it can probably be answered with "go find a lib for reading word docs and another for writing pdfs."
– unflores
Nov 22 at 13:51
add a comment |
Your question is actually hiding a second, which is "how do you read a word doc?". I think this was downvoted because the question is so vague that it can probably be answered with "go find a lib for reading word docs and another for writing pdfs."
– unflores
Nov 22 at 13:51
Your question is actually hiding a second, which is "how do you read a word doc?". I think this was downvoted because the question is so vague that it can probably be answered with "go find a lib for reading word docs and another for writing pdfs."
– unflores
Nov 22 at 13:51
Your question is actually hiding a second, which is "how do you read a word doc?". I think this was downvoted because the question is so vague that it can probably be answered with "go find a lib for reading word docs and another for writing pdfs."
– unflores
Nov 22 at 13:51
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53431223%2fhow-to-create-pdf-documents-with-node-js%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53431223%2fhow-to-create-pdf-documents-with-node-js%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Your question is actually hiding a second, which is "how do you read a word doc?". I think this was downvoted because the question is so vague that it can probably be answered with "go find a lib for reading word docs and another for writing pdfs."
– unflores
Nov 22 at 13:51