Html to pdf asp.net mvc [closed] - asp.net-mvc-3

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am trying to find a library/tool that would allow me to generate PDF from MVC views.
Any ideas, suggestions?
Regards

use iTextSharp for C# which is ported from iText from JAVA
check out
ITextSharp HTML to PDF?

I've created a project for doing this using iTextSharp, and published on bitbucket.
I override a ViewResult, to return a Pdf stream to the client. The pdf is generated in a MVC View (.cshtml file). And added some Extensions for the controller to make the experience smooth.
I have two options:
Create the Pdf from a "normal" view that returns Html. It's very easy, but you do not have "fine" control over the layout.
Create a Pdf using code, the layout code is in the View (using server side code). This is easy for customization, and testing. Because you do not need to recompile the whole project. Also IMHO the View (.cshtml file) is responsible for the layout, if the result is html or pdf does not mather, its still the view.

You will need to call RenderView to get the HTML result and then convert to PDF. Check this entry out for a similar solution
http://www.jimzimmerman.com/blog/2009/10/06/PdfResult+A+Custom+ActionResult+In+ASPNET+MVC.aspx

Related

Which template engine i have to use? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
i am developing website spring mvc , hibernate with my SQL database. my colleagues suggested to me to use free marker or velocity template engine but i'm using jsp template engine .i'm totally confused. So, can anyone please tell me jsp is best or not and why i will go for jsp or?.
Each one of them have some advantages that you could use if you need them, as always with this kind of questions the answers depends on what you want to achieve and how a template engine could help you.
For example, if you want to use the generated HTML pages as working mockups (because you need to show them), I would go for Thymeleaf. This document shows the key differences between Thymeleaf and JSP.

How to create a visual sitemap of a large existing website? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I need to evaluate a current existing website's sitemap and structure. Normally i utilize a patchwork of utilities and programs and end up creating the visual site with either illustrator or slickmaps for a browser based solution.
I have started down this road again and realize this site is much too large to do this all by hand. My "dream" solution would create an attractive diagram of the website possibly from an xml file, and show cross linking and those kinds of relationships. The icing on the cake would be if i could also get it to mashup with google analytics site visitation metrics - but that would probably be asking too much...
Any help appreciated...
Shawna
Do you need sitemap for seo? We use at http://applehub.us/ huge xml file generated by script. I think it would useless create site map for users
For building flow diagram of a website you can try the Site Visualizer software.
Run the app, create new project, enter URL of the site, then click Start button. After the site will be crawled, go to Visual Sitemap tab and click Draw button. Similar visual structure of the website will be drawn:
Click on a page in order to highlight all its outbound links. Click on Save button to save the diagram to an image file.
More info is available here.

MVC3 Razor and Knockout in VS 2010? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm now diving into MVC3 with VS 2010 and looking at a few front-end frameworks. It looks like Razor is the standard for front-end integration, but I'm not too familiar with how something like KnockoutJS fits into this. My impression is that it is a data container that gives us observable collection functionality on the Web - not having to develop in Silverlight, for example, to make use of this functionality.
Looking at the Mix11 Video presentation of KnockoutJS, I'm once again guessing, that based on the jQuery integration capability, that we could simply replace jQuery with any other front-end library, such as Razor.
Is there any plan on integrating this into VS?
Razor is a back-end technology which works at the server side to render your HTML pages.
KnockoutJS on the other end is a pure client-side technology for UI-binding.
How they fit together?
At the server side you do all your business logic etc. and get's some data to display it to the user. Now how this data will be transported to user and displayed in HTML is something improvised through Razor. It helps you to incorporated dynamic data in your HTML pages. This also includes saving information in Javascript variables incase they are required at the client-side.
Once the HTML page + all Javascript is sent to the client side, the page is rendered by the browser and the Javascript kicks in to improve page's usability and interaction. Here KnockoutJs (which is essentially Javascript) comes into play and you could use it improve the usability of your pages through binding HTML elements to Javascript variables. At this stage, Razor has no role what so ever to play.
I hope this makes sense.

Can MikTeX create tagged PDFs? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Tagged PDFs allow for the easy reflow and accessibility of PDFs. It seems like this would be a natural use case for using LaTeX, which advocates content over style. But as far as I can tell, there is no way to create a tagged PDF with MikTeX 2.8.
Does anybody know of any tips, tricks or techniques to get a tagged PDF through LaTeX without resort to the commercial version of Adobe Acrobat?
Hmm, well, yes, sort of.
There isn't really sophisticated support for tagging, and what there is, is implemented in pdftex/luatex. Support for bookmarks and in-document cross-references is done using tagging. There's also been some more sophisticated work shown at TUG conferences, but this is all in the pipeline for now.
Context/luatex has better support that Latex for this sort of thing: there's some support for interactive documents using Context's layers, where the contents of the layers change when buttons are clicked in the PDF. I think this must be done using tagging.
I've never heard of anything like embedded forms, digital signing, or embedding the Latex/Tex/Context source in the resulting PDF, but in principle this is all possible.
I've the same question with pdfLatex in general and found this:
http://sarovar.org/tracker/index.php?func=detail&aid=945&group_id=106&atid=495
But I don't test it till now.

Php LiveDocx library or another template based pdf creation lib [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I need to generate gift vouchers from PHP code and was looking at PDF libraries to accomplish this. Stumbled upon LiveDocx http://www.livedocx.com/ which looks like an excellent service and then found http://www.phplivedocx.org/ which looks like the natural choice for PHP. Problem is I'm using Zend Framework 1.6 still. Is there a way to get phplivedocx to work with Zend 1.6 or is there another template based php generation library that I can use?
Any other suggestions on accomplishing my original goal of generating vouchers is welcome although I must say that I've gone the programmatic approach before using TCPDF. It works well but is just too much work to get nice pdf design.
I ended up generating an HTML file and converting it with the wkhtmltopdf (Webkit HTML to Pdf) tool: http://code.google.com/p/wkhtmltopdf/
If using a WYSIWYG editor to generate the HTML then I guess one is almost at the kind of functionality that livedocx brings i.e. to allow templates to be created with an editor.
The zend framework is loosely coupled. You should try downloaded the latest copy and placing the Zend_Service_LiveDocX folder in your Zend library in the Zend_Services folder and if you have autoloading enabled, your application should be able to find it and use it... it's worth a try and certainly a better idea than sourcing another third party application. I too have used all the various pdf libraries out there for php and you know what, I hated every one of them.

Resources