Pages

Showing posts with label as. Show all posts
Showing posts with label as. Show all posts

Sunday, October 19, 2014

Add Print as PDF Button in Your Blog!



Save as PDF Button


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- 
  1. Sign in into your blog. Then go to design.
  2. From the left panel, hit on the Layout button.
  3. Now click on Add a Gadget.
  4. Choose HTML/ JavaScript.
  5. Now copy and paste the following code into the Content Box.
  6. 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>

Print Friendly and PDF

Stay with Marks PC Solution to get more interesting IT topics!

Read more »

Thursday, October 2, 2014

Save Text as Audio File Feature in Mac OS X Lion

A new Feature in Mac OS X Lion will allow users to select text and convert it into an audio file. This feature will work with any text that can be highlighted. In order to convert text into an audio file right click on the selected text and click on add to iTunes as a spoken track. Then a window will appear that allows you to select the voice and name of the audio file. The feature is available in Snow Leopard but is not enabled by default. Kurzweil also has a similar feature where you can covert text an audio. There is also a speech feature in Snow Leopard and iOS 5 beta. The speech feature allows selected text to be spoken aloud by a computerized voice. To start the speech feature select the text and right click then click on speech. Mac OS X Lion will be released in July and iOS 5 will be released in the Fall.
Read more »