Showing posts with label add. Show all posts
Showing posts with label add. Show all posts
Sunday, October 19, 2014
Add Print as PDF Button in Your Blog!

Sometimes your blog or website reader may wanna save the post as PDF. Or they may want to print it. And there are many free tools to add Save as PDF button. But the problem is that, most of the free tools doesnt allow you to remove the background images of your site. I mean this is not print friendly. As a result whole web page is saved. And this is very irritating.
Today Im sharing a code that is free from this problem. It allows you to save only the text with related image. Lets try this-
- Sign in into your blog. Then go to design.
- From the left panel, hit on the Layout button.
- Now click on Add a Gadget.
- Choose HTML/ JavaScript.
- Now copy and paste the following code into the Content Box.
- Save the gadget and view your blog to see the change!
<script src="http://cdn.printfriendly.com/printfriendly.js" type="text/javascript"></script><script type="text/javascript">document.doAT = function(cl){var myclass = new RegExp("hentry");var myTitleContainer = new RegExp("post-title");var myPostContent = new RegExp("post-footer");var elem = this.getElementsByTagName("div");for (var i = 0; i < elem.length; i++){var classes = elem[i].className;if (myclass.test(classes)){var container = elem[i];for (var b = 0; b < container.childNodes.length; b++){var item = container.childNodes[b].className;if (myTitleContainer.test(item)){var link = container.childNodes[b].getElementsByTagName("a");if (typeof(link[0]) != "undefined"){var url = link[0].href;var index_page = true;}else{var url = document.url;var index_page = false;}if (typeof(url) == "undefined"|| url == "undefined" ){url = window.location.href;var index_page = false;}}if (myPostContent.test(item)){var footer = container.childNodes[b];}}var n = document.createElement("div");if (index_page == true) {var at = <a href= + url + ?pfstyle=wp + style="float:right; margin-right: 1em; color:#6D9F00; text-decoration:none;" class="printfriendly" title="Printer Friendly and PDF"><img style="border:none;" src="http://cdn.printfriendly.com/button-print-grnw20.png" alt="Print Friendly and PDF"/></a>;}else {var at = <a href="http://www.printfriendly.com" style="float:right; margin-right: 1em; color:#6D9F00; text-decoration:none;" class="printfriendly" onclick="window.print(); return false;" title="Printer Friendly and PDF"><img style="border:none;" src="http://cdn.printfriendly.com/button-print-grnw20.png" alt="Print Friendly and PDF"/></a>;}n.innerHTML = at;var origFooter = footer.innerHTML;footer.innerHTML = n.innerHTML + origFooter;footer.style.overflow = "hidden";}}return true;};document.doAT("hentry");</script>
If you wanna place the button at the left side then replace the red colored words as- float:left. And if you are expert in coding like html, CSS, then you can easily place this code anywhere you want.
Code for other Websites Other than Blogger:
<script src="http://cdn.printfriendly.com/printfriendly.js" type="text/javascript"></script><a href="http://www.printfriendly.com" style=" color:#6D9F00; text-decoration:none;" class="printfriendly" onclick="window.print(); return false;" title="Printer Friendly and PDF"><img style="border:none;" src="http://cdn.printfriendly.com/button-print-grnw20.png" alt="Print Friendly and PDF"/></a>
Stay with Marks PC Solution to get more interesting IT topics!
Monday, September 29, 2014
Add a Moving Text Bar on Your Blog
Today I will give you a code that is really really useful for bloggers. You have already noticed that this post has been started with a moving text. And from this post youll learn how to add this on your blog.
Before starting I wanna say you, this bar can be used as news headline or notice bar. Or you can use this for any purpose. Its simply an html code that can be place anywhere of your blog. If you place it at the top then it can be used as news bar. You can also put it on the side or bottom of your blog. But make sure youre customizing the size and using the bar properly with the place where you wanna insert it.
Lets start. (Make sure youre using new interface of blogger)
- First, go to the design option from your blogger page.
- Then hit on Layout option from the left panel.
- Now click on Add a Gadget. I suggest to select gadget somewhere from top.
- Now scroll down and choose Html/Java Script then copy and paste the code below.
- Youre done. Save the code and refresh your blog page.
<!-- This Script is from munnamark.blogspot.com, Coded by: Md. Abdur Rahaman--> <div align="center"><font color="#ffffff" size="+1"><marquee bgcolor="#000080"direction="left"loop="20" width="100%"><strong>Visit <a href=http://www.munnamark.blogspot.com>Marks PC Solution</a> to get more interesting Computer and Internet Tips! </strong></marquee></font color="#ffffff"></div> <font face="Arial"><a target="_blank" href="http://www.munnamark.blogspot.com/"><span style="font-size: 7pt; text-decoration: none">Visit Marks PC Solution for Computer and Internet Tips</span></a></font>
- Replace the red text of the code with your text.
- Loop is 20. That means your text will be shown for 20 times. You can either increase or decrease the loop. But if you want the text to be shown for unlimited time then you should delete the this part of the code: loop="20"
- Div align center. You can use right or left.
- Font color is #ffffff. You can choose any font color by changing the value.
- Background color is "#000080". You can choose any color by changing the value.
- Direction is left. You can also use right.
- Width is 100%. You can use 40, 50 or 70% too.
Stay with Marks PC Solution to get more interesting IT topics!
How to use command line add on to repair invalid zip files
| Image via Wikipedia |
Zipped file make it much easier to send and receive large files through e-mails. With the use of compressed files format (like .zip) we can convert large files into small files that can be sending via e-mail. But these zip file may get corrupt due to several reason like virus attack, at the time of attachment with slow Internet; improper downloading of zipped files etc. In the file zip corruption situation you cannot access your data which is present inside zipped file. In that case you need to use some repair method or use zip recovery software to repair corrupt zipped file.
WinZip offers several methods to repair corrupt .zip or .zipx files depend of corruption cases. Invalid zip file corruption case can be handled by WinZip Command Line Support Add-On. But this command line support add-on not support of all version of WinZip it works for WinZip 10.0 and later versions. Depends on your version of WinZip you can download appropriate version of command line support add-on from here.
Follow the steps written below to use command line support add on...
- Click Start, click All Programs, and click Accessories
- Right click Command Prompt and choose Run as administrator
(Windows XP: Left click Command Prompt) - Change directories to the folder where the corrupted Zip file is located.
- Type: "C:Program FilesWinZipwzzip" -yf zipfile.zip
You can use below written command if zip file is split or spanned
"C:Program FilesWinZipwzzip" -yfs zipfile.zip
WZZIP will create a new Zip file with a fixed suffix in the file name. The original Zip file will not be modified. Only the data in the original Zip file is used. I am sure that above method will fix your Invalid zip fileproblem. For any reason if above method didnt work for you then use some zip recovery software which is compatible with your system configuration to solve the problem.
Subscribe to:
Posts (Atom)