Meteor: Exporting rendered template for offline use - meteor

I have an online tool for users to build and preview slideshow presentations (uploading images, editing text).
Would there be a way to "export" the content of a rendered slideshow for offline use? This would mean the user could view the presentation locally in a browser using only static files.

Use
var myRenderedHTML = Blaze.toHTMLWithData(templateYouWantToCache, dataUsedToRenderTemplate);
Then use something like the Filesaver.js library to force download of that content as an HTML file. (as in the last demo on this page)

Related

Injecting a custom stylesheet into a site via Chrome Devtools

Here's the plan: I'm trying to customize a site. I want to create and edit a CSS file locally (on my own text editor) and inject it into the page using the new Workspace and Filesystem features in DevTools.
These two features seem to work quite well, except they only allow you to map certain local files to network files.
I want to create a new file and inject that into the page, not modify an existing (loaded) stylesheet.
Anybody have any ideas?
U can use the chrome extentions for that...create an extention and everytime a page loads you can add that to it.I had done it earlier,modifying the contents of www.imdb.com for a extention of mine called Movie mapper,unfortunately Chrome store removed it after 1 yr.You want the code ? I can share

A "shortcut" method for exporting an ASP.Net Page to pdf/xls

I want to export a few Pages to pdf/xls. By Pages I mean as the eye sees it - a screenshot of the Page's contents. I know how to build pdf/xls documents using 3rd party tools but is there any way to quickly export the rendered contents of say a Panel?
edit: maybe a tool that can render the page's output as a browser would, and save it as an image file?
There is an open source console program named wkhtmltopdf which you could call from asp.net to convert the page. It can convert to PDF or an image with wkhtmltoimage (JPG, PNG, etc.) using the webkit rendering engine.
Check my answer to this question to see an example of how to convert from a html to a pdf using C#:
Easiest way of porting html table data to readable document
I can recommend http://www.screengrab.org/ for firefox.

HTML editor and image upload to server

In asp.net, when we work with any html editor, I often include images and text. How will images upload to a specific folder in the server and be saved as a relative path in the db. I Need this concept for a CMS.
I was using CKEditor first but it was found a bit difficult to work with asp.net. So I moved to obout editor. I think your problem can be solved with obout html editor. check this link, obout.com - Html Editor - Image upload
Why do you need to store the image's relative path in the DB ? As there is no need, because the content html is saved in the DB and when you the retrieve that content that particular image will be shown in the content.
As far as I have used CK Editor, there is some setting required in the config file to set the path where the images are stored when user adds images in content.

Regarding CMS concept and html editor in asp.net

we create page through html editor in CMS project. when we design pages then we can add image through html editor. so i just want to know how automatically image path will be stored in my database table and image will upload in proper forlder. suppose i work with fckeditor.
fckeditor can automatically upload images in right folder and how images path will be saved in right table. do i need to parse the html and extract images and replace the image path with properly and atlast upload images programatically to right folder on server before saving the html to databased. please discuss this in detail because i never work with CMS before.
what is the best html editor for CMS and asp.net project.
also tell me what the best free open source CMS for asp.net.
thanks.

Using PDF In .Net App

Can someone point me to some code/tutorial on how to upload pdf files and store them, then moreover how to use a pdf reader to display the file as read only in an asp.net application.
Is there a PDF reader already in the visual studio toolbox?
The approach I would use in this situation is to upload the PDF as you would any other file, then use a tool like GhostScript to convert the PDF pages into image files that you can show in ASP .Net.
Here's a tutorial doing that in C# http://www.codeproject.com/KB/cs/GhostScriptUseWithCSharp.aspx
Adobe provides (on acrobat.com) a free service which provides you with the ability to upload pdf (and also other types like doc...) and then embed a nice flash interface for displaying the files on your page.
It's pretty helpful as you can store some 5 gigs of files here.
But if you want to let the users upload their own files then this won't help you.
PDF is a final format file, ie its is read-only for the most part and can be embedded into the page via the <object> tag, except if you mean downloadable by the user.
Displaying PDF is generally done by rasterising to an image format for display (ie as an image on the page or via a richer interface (with zooming etc) through flash/silverlight etc.
You can use [GhostScript][1] to interpret PDF files and convert them to an image.
[1]: http://www.GhostScript .com
Uploading a PDF is just like any other file. Use the ASP.NET file uploader control:
http://www.codeproject.com/KB/aspnet/fileupload.aspx
In order to view the PDF in an ASP.NET application, you could either depend on Acrobat being there or use a PDF Viewer control.
The company I work for, Atalasoft, sells a PDF Reader add-on to our web viewer controls. You can learn more here: http://www.atalasoft.com/products/dotimage/pdf-reader

Resources