I have a need to have a PDF document that has a very specific format. I have data that is in a Meteor 1.0 application stored in MongoDB. How can I use a LaTeX template in place of an HTML template?
I have a number of Meteor packages where I have repackaged JS libraries and written complete packages. I know how to do that.
I don't wish to use HTML for the output because I need the output to be very exacting. I can achieve that with LaTeX. What I am unsure of is how to use LaTeX as the template and inject data into the document before processing and ultimately printing.
Meteor is at 1.0.
On this version things changed a lot. You have to choose the packages that you want to use.
According to the documentation:
Since the parts of the stack integrate seamlessly, if you don't want to think about how it all works, you don't have to. You don't have to understand that the platform is made up of Blaze, Tracker, DDP, Livequery, and Isobuild, or how these pieces fit together. But if you want to dive in and learn how the parts work, you can do that too, because they are independent projects.
So you can code a meteor application without using Blaze. Check the meteor website for more information on this: https://www.meteor.com/projects
If you want to use Blaze (normal choise), you can get to know it better at https://docs.meteor.com/#/full/blaze
and you can adapt an existing LaTeX to HTML convert and create a template dynamically.
Related
I have enabled Flow on a JavaScript project I am developing. Since I am putting in the effort to providing type annotations, I would really like to generate *.d.ts files so the broader TypeScript community can also have type information.
How can I generate *.d.ts type definition files from Flow-annotated JavaScript?
I searched for the available tools. I found the following.
The first one is the most up to date one. It can convert the whole Flow code to TypeScript. I have used it personally, and it works like a charm.
https://github.com/Khan/flow-to-ts
Other ones:
https://github.com/Kiikurage/babel-plugin-flow-to-typescript
https://github.com/burnnat/flow-to-dts
https://github.com/bcherny/flow-to-typescript
https://github.com/yuya-takeyama/flow2dts
I am currently using meteorhacks:ssr along with wkhtmltopdf in order to generate downloadable pdfs within my Meteor app. It is working end-to-end, which is great, apart from one last element.
The template helpers which have been specified in packages across my app, are not visible. From the examples in the documentation for SSR it uses templates and helpers specified at a super-package level, which is not feasible with a package based arrangement for an app.
The only way I can see to make them available both client and server-side is to store the functions in an object, and then to loop through the helper functions in client and server code to render the functions accessible in both places.
That methodology works, but it is rather lacking in beauty. Does anyone have any other experience/ideas with this?
I found this tool but I wonder if it still the right way nowdays with net 4.0 or is there any straight forward oob alternatives.
I just need to add columns and update excel stuff programatically. There are many ways but I need to keep the original document as a template. The link above explains exactly what the requeriments are and why they created such "ExcelPackage" library.
A quick look at the link you provided seems like it will in fact keep the original template intact and just return a populated version of that template. This is a pretty common way to create and populate Excel documents using Open XML since it helps to minimize the amount of code you have to write. If you did not specify the layout, styles, formats, etc in a template you would be forced to define those when coding and that could lead to some bloated code. Overall, a project like this or using the Open XML SDK 2.0 to create the documents is the way to go.
How to do a mail merge in asp.net without installing word on the server?
any dlls or any components available?
Edits
The template document is already available. im not trying to create a word document. Just want to link the word document with the data.
Thanks
Personally, I would just look at using the System.Net.Mail class and its templating abilities. There is a nice library here: https://github.com/lukencode/FluentEmail which you can pass templates into and send emails that way with the data you require inserted into it.
EDIT: noticed you didn't actually specify whether it was print mailmerge or email, apologies if it is a print mailmerge you are trying to create, but for mass emailing with customized data in it, templating is definitely the way to go.
To accomplish the Word doc creation part of the question there is a previous thread about this: How can a Word document be created in C#?
To send the completed doc check out the System.Net.Mail namespace: http://msdn.microsoft.com/en-us/library/system.net.mail.aspx or if you can afford it I have had great experience with http://www.aspnetemail.com/.
We use Aspose.Words to perform mail merges from .net code. It's not cheap but once you get to grips with it it's very powerful.
Edit: I'm assuming you are looking to merge data from some sort of data store into a template word document which can be printed and distributed.
Another option is Docentric Toolkit. It is pure .NET and based on OpenXML without any dependency on MS Word, so it is a good fit for server side report generation.
Merging with data is done through placeholders, which get filled up with data at run time. Data can come from database or XML.
Templates are created in MS Word which needs Docentric Toolkit add-in installed (license is needed).
It is really easy to create templates and to merge them with data from .NET code.
I need to know how we can Generate WordML Reports Using Templates and XPath using ASP.Net.
What are its advantages.
A Simple How To Tutorial is what I require.
I need to know how we can Generate WordML Reports Using Templates and XPath using ASP.Net. ... A Simple How To Tutorial is what I require.
Create (using Word) a document in WordML format which you'll use as a template.
Look at your WordML template: see that it's in XML format. Have Microsoft's WordML reference documentation, so that you understand what it means and how to modify it.
Define XPath expressions which identify the locations in your template which you want to modify (where "modify" probably means "insert data at run time").
At runtime use an API like http://www.google.com/search?hl=en&q=c%23+xpath
What are its advantages.
Its advantages over what alternative?
The benefit is that the output is a Word document, whose content is based on a template plus modifications made at runtime.
I would recommend you to use Content Controls and Custom XML for the purpose of report generation. Here's a sample:
http://blogs.msdn.com/erikaehrli/archive/2006/08/11/word2007DataDocumentGenerationPart1.aspx
You might also want to have a look at Microsoft's OpenXML SDK v2.0